The Sheriff may be imprisoned in the jail of his county, and for the time he is so imprisoned, the coroner shall be warden of the jail, and perform all the duties of the sheriff in regard thereto, and shall, by himself and his sureties, be answerable for the faithful discharge of his duties as such warden.
730 ILCS 125/8