When the prisoner is remanded, the execution of the judgment shall not be suspended by the writ of error, or suspended for the purpose of applying for one; but where he is ordered to be discharged, and the execution of the judgment to be suspended for the purpose of applying for a writ of error, the court or judge making such suspending order may, in its or his discretion, admit the prisoner to bail until the expiration of the time allowed for applying for the writ of error, or, in case the writ of error be allowed, until the decision of the Supreme Court of Appeals thereon is duly certified.