152. Illegal commitment.

A person who is in custody under a warrant or order of commitment may test the validity of the warrant or order under which he is detained by means of the writ of habeas corpus for release1, as, for instance, where he is imprisoned under the sentence of a naval, military2 or ecclesiastical court3, or interned under the authority of some emergency statute4. Habeas corpus may, further, be available when a suspect has been detained by the police for an unduly long period without being charged