A snifting valve (sometimes snifter valve) is an automatic anti-vacuum valve used in a steam locomotive when coasting. The word Snift imitates the sound made by the valve.

When the driver shuts off the steam to the cylinders of a steam locomotive while it is in motion, the moving pistons could create a partial vacuum in the cylinders. This would give rise to two problems. Firstly, the pumping action would absorb energy and prevent the engine from coasting freely. Secondly, when the exhaust valve opened, soot and cinders from the smokebox could be sucked down the exhaust pipe and into the valve chest or cylinder, causing damage. (The exhaust is open to the smokebox because in normal running the exhaust steam is sent through the blastpipe to draw the fire and eject the combustion products from the chimney.) These problems are avoided by using snifting valves to allow air to be drawn into the cylinder. On railways which did not use snifting valves, drivers were instructed to keep the regulator slightly open when coasting to avoid the creation of a vacuum.

More Info: en.wikipedia.org