-352§ 1593. Recommitment to proper custody If a person is held under illegal restraint or custody, or another person is entitled to the restraint or custody of the person, the judge or court may order the person to be committed to the restraint or custody of the person who is by law entitled thereto. § 1594. Imprisonment after discharge A person who has been discharged by order of the court or judge upon habeas corpus may not be again imprisoned or restrained, or kept in custody, for the same cause, except in the following cases: (1) if he has been discharged from custody on a criminal charge, and is afterwards committed for the same offense, by legal order or process; or (2) if, after a discharge for defect of proof, or for defect of the process, warrant or commitment in a criminal case, the prisoner is again arrested on sufficient proof and committed by legal process for the preceding offense. § 1595. Warrant in lieu of writ of habeas corpus (a) When it appears to the district court or judge that anyone is illegally held in custody, confinement or restraint, and that there is reason to believe that he will be carried out of the jurisdiction of the court or judge before whom the application is made, or will suffer an irreparable injury before compliance with the writ of habeas corpus can be enforced, the court or judge may cause a warrant to be issued, reciting the facts, and directed to any court officer, commanding the officer to take the person thus held in custody, confinement or restraint, and forthwith bring him before the court or judge, to be dealt with according to law. (b) The court or judge may also insert in the warrant a command for the apprehension of the person charged with the illegal detention and restraint. (c) The officer to whom the warrant is delivered shall execute it by bringing the person or persons therein named before the court or judge who directed the issuing of the warrant. (d) The person alleged to have the person under illegal confinement or restraint may make return to the warrant as in case of a writ of habeas corpus, and it may be denied, and like allegations, proofs and trial may thereupon be had as upon a return to a writ of habeas corpus. (e) If the person is held under illegal restraint or custody, he shall be discharged; and if not, he shall be restored to the care or custody of the person entitled thereto. § 1596. Time of issuance and service of writs and process All writs and process authorized by this chapter may be issued and served on any day and at any time. § 1597. Issuance and return of writs and process (a) All writs, warrants, process and subpoenas authorized by this chapter shall be issued by the clerk of the court, and, except subpoenas, be sealed with the seal of the court and served and returned forthwith, unless the court or judge specifies a particular time for the return. (b) All such writs and process, when made returnable before a judge, shall be returned before him at the place of holding court, and there heard and determined. § 1598. Motion to vacate or correct sentence Section 2255 of Title 28, United States Code, applies to prisoners in custody under sentences of the district court, but it does not apply to prisoners in custody under sentences of the magistrates' courts.