See this dialog response. To prevent this, some appliances use a thermocouple in a fail-safe circuit to sense when the pilot light is burning. What came before?
Phone call:
 P1) what is the difference between a fire code and an ad hoc test
 P2) The cooling curve of a small steel sample can be analyzed and used to estimate the carbon content of molten steel.
 P1) what is the purpose of the pilot flame
 P2) Many gas-fed heating appliances such as ovens and water heaters make use of a pilot flame to ignite the main gas burner when required.
 P1) what happens if the flame goes out
 P2) If the pilot flame goes out, unburned gas may be released, which is an explosion risk and a health hazard.
 P1) how is the issue prevented
 P2) 