You should read the section on gas safety before attempting any repairs.

The purpose of the safety valve is to shut off the flow of propane if the burner flame goes out.

Inside the body of the safety valve is an electromagnet connected to a spring loaded plunger. When the electromagnet is energized, it holds the plunger up, allowing gas to flow through the valve. When the electromagnet is de-energized, the plunger snaps to the closed position, stopping the flow of gas.

Millivolts are provided to the electromagnet by the thermocouple (not shown) which generates millivolts when heated. The thermocouple screws into a fitting at the top of the safety valve to make an electric connection. A button connected to a shaft at the bottom of the safety valve is used to temporarily push the plunger open while lighting. There's two reasons for this: 1) gas has to flow through the safety valve to make it possible to light the burner, and 2) the plunger has to be pushed all the way up for the electromagnet to hold it up. In other words, the electromagnet is strong enough to hold the plunger up once there, but is not strong enough to "suck" it up. Sometimes a problem with the flame not staying lit after releasing the button can be attributed to not pushing the plunger all the way up.

Troubleshooting
Some problems associated with the safety valve are: a bad electromagnet; a poor connection with the thermocouple, a foreign particle inside the body of the valve, preventing the plunger from closing completely; or gas leaks. It is possible to disassemble the safety valve from the top down, making it possible to replace the electromagnet on the models where a replacement is available and to also clean out any foreign particle. If the electromagnet only is not available and it is the problem, or you have gas leaks, replace the safety valve.

See the Safety System section for more troubleshooting.