The coroner shall also require all material witnesses to enter into an undertaking to appear at such court, if in session, or at the next succeeding term, and may require security for such undertaking, and, for this purpose, the coroner is vested with all the powers of a court of general sessions in state cases.