The sheriff shall be the executive officer of the circuit and chancery court of his county, and he shall attend all the sessions thereof with a sufficient number of deputies or bailiffs. He shall execute all orders and decrees of said courts directed to him to be executed. He shall take into his custody, and safely keep, in the jail of his county, all persons committed by order of either of said courts, or by any process issuing therefrom, or lawfully required to be held for appearance before either of them.