A legal prison is the building designated by law, or used by the sheriff, for the confinement, or detention of those whose persons are judicially ordered to be kept in custody. But in cases of necessity, the sheriff may make his own house, or any other place, a prison. An illegal prison is one not authorized by law, but established by private authority; when the confinement is illegal, every place where the party is arrested is a prison; as, the street, if he be detained in passing along.
Law Dictionary – Alternative Legal Definition
A public building for the confinement or safe custody of persons, whether as a punishment imposed by the law or otherwise in the course of the administration of justice. See Scarborough v. Thornton, 9 Pa. 451; Sturtevant v. Com., 158 Mass. 598, 33 N. E. 648; Pen. Code N. Y. 1903,