The writ may be had for the purpose of admitting a prisoner to bail in civil and criminal actions. When any person has an interest in the detention, and the prisoner shall not be discharged until the person having such interest is notified.
[Code 1881 § 679; 1877 p 140 § 682; 1869 p 158 § 619; 1854 p 214 § 447; RRS § 1077.]