Persons imprisoned upon legal process, civil or criminal, in which the cause of the imprisonment is distinctly expressed, and persons committed by a court or judge of the United States, and where no judge of a court of this state has authority to discharge or to commit to bail, are not entitled of right to such writ.
RSA 534:2
RS 202:2. CS 215:2. GS 224:2. GL 243:2. PS 239:2. PL 350 :2. RL 406:2.