Mostly that's when it happens. Your car might start a bit more slowly than it should in that case because the fuel rail has to be repressurized since the fuel has all leaked out through leaky injectors.
A cars engine needs the proper air fuel mixture as well as an ignition source. If any one of these are slightly off balance the engine will not run smooth. A vacuum leak can lean the mixture in a carbureted engine. A broken wire can keep one injector from working.
This depends what shut off valve is in question here. Where the leak is and what type of material is the shut off valve made of.
The fuel shut off switch can be found on the firewall in the engine compartment. The fuel shut off switch will be directly behind the fuel injector pump.
A poor seal or a split.
in injector pump
If it runs fairly normal once it starts and you're getting fuel into the crankcase, it's PROBABLY a leaking injector. After the engine is shut off there is still pressure in the fuel line. If the injector leaks, fuel will drip down into the intake manifold. If a cylinder has an open intake valve, the fuel will leak into there and find it's way into the crankcase.
if it is under the hood, it could be a small antifreeze or oil leak that when the engine is running the smoke is blown away, but when shut off it continues to burn off but is not blown away.
The fuel is shut off to shut the engine off.
Check for a main vacuum leak. Do you feel a loss of power at idle? The A/C and defrost (which uses the A/C) require power from the engine. If it can handle the accessories (A/C, Defrost) it will shut off. Also the power steering strains the engine, does it shut off when you turn the wheel all the way? If so check for a vacuum leak. If the engine is idling rough, get it fixed.
I undo the diesel filter and fill with diesel to the top, and refit, Then slacken off the fuel injector supply pipes on the injector end, Crank over engine until fuel appears to leak down injector connection, tighten injector fuel connections and then continue to crank over engine. Should then start to fire up. Keep cranking till engine running on its own.
A bad fuel injector can cause an engine to continue running, for a few seconds, after the engine to shut off. The engine continues to run because of excessive fuel in a piston.
Where is the oil tank? Do you mean gas in the engine oil? Bad fuel injector or bad computer causing injector to stay open and let gas leak into engine after shut down. Should be missing and rough idle also. Clicking could be oil is thinned out by gasoline.?