When the return of the writ has been made, and the applicant brought before the court, he is no longer detained on the original warrant or process, but under the authority of the habeas corpus. The safekeeping of the prisoner, pending the examination or hearing, is entirely under the direction and authority of the judge or court issuing the writ, or to which the return is made. He may be bailed from day to day, or be remanded to the same jail whence he came, or to any other place of safekeeping under the control of the judge or court, till the case is finally determined.