Unlatched generally, especially on the older machines to keep from "flattening" door gaskets as mentioned. Rubber door gaskets that have some age on them will dry out and lose their springiness so the less compression the better. I'll let you know in a couple of decades if this made any difference at all 
All dishwashers have some ventilation to the environment or they would explode when filling with water so latching the door does little to keep anything "sealed" in or out. If it smells, run it and enjoy the fun.

All dishwashers have some ventilation to the environment or they would explode when filling with water so latching the door does little to keep anything "sealed" in or out. If it smells, run it and enjoy the fun.