Until judgment be given upon the return, the court before whom the party shall be brought may either commit such party to the custody of the sheriff of the county in which the proceedings are had, or place him in such care or custody as his age or other circumstances may require.