If there is a pilot light the stove should cycle off when the tempreature is reached and should come back on later to re-heat. If the pilot is out of order there is a protection there to keep raw gas from being expelled. Its called a thermocouple and if there is not a small gas flame to keep it warm, it shuts the gas valve down.
Alternatively: there could be an electric lighter rather than a standing flame. Still, if it fails the valve will not open just to spew gas.