Until judgment is given on the return, the court or judge may commit the party to the custody of the sheriff of the county or place him in such care, or under such custody, as his age or circumstances may require.