Pending appellate review of an order discharging a writ of habeas corpus after it has been issued, the prisoner may be remanded to the custody from which he was taken by the writ, or detained in other appropriate custody, or admitted to bail, as to the court or judge rendering the decision may appear fitting in the circumstances of the particular case.
SDCL 21-27-21