I don't practically see it happen, but you have to be careful once you are in a jail though, because there are often few limits on what the administration of the jail can do to you for any supposed violation of the jail rules (which they can legally make up on a whim, and due process is extremely limited). In Illinois, at least, a county Sheriff has unlimited power to punish a detainee in any extreme way they can imagine for even the very slightest infraction. There are no laws (statutes) which define what a "crime" is inside jail and what the punishment for it is. If it wasn't for SCOTUS limiting the death penalty to certain levels of behavior (e.g. murder) then a sheriff would be able to simply legally execute a detainee for pretty much anything.