There are specific rules for prisons (as there are for theme parks and haunted houses.) They must have fire detection and a way to unlock if it is detected, and usually there must be someone monitoring the system whenever occupied and ready to enact emergency procedures.