section 117 does not give such security on or before the d ate on which the period for which such security is to be given commences, he shall, except in the case next hereinafter mentioned, be committed to prison, or, if he is already in prison, be detained in prison until such period expires or until within such period he gives the security to the Court or Magistrate who made the order requiring it. (b) If any person after having executed a 1[bond, with or without sureties] for keeping the peace in pursuance of an order of a Magistrate under secti on 117, is proved, to the satisfaction of such Magistrate or his successor -in- office, to have committed breach of the bond, such Magistrate or successor -in-office may, after recording the grounds of such proof, order that the person be arrested and detaine d in prison until the expiry of the period of the bond and such order shall be without prejudice to any other punishment or forfeiture to which the said person may be liable in accordance with law. (2) When such person has been ordered by a Magistrate to g ive security for a period exceeding one year, such Magistrate shall, if such person does not give such security as aforesaid, issue a warrant directing him to be detained in prison pending the orders of the Sessions Judge and the proceedings shall be laid, as soon as conveniently may be, before such Court. (3) Such Court, after examining such proceedings and requiring from the Magistrate any further information or evidence which it thinks necessary, and after giving the concerned person a reasonable opportu nity of being heard, may pass such order on the case as it thinks fit: Provided that the period (if any) for which any person is imprisoned for failure to give security shall not exceed three years. (4) If security has been required in the course of the sa me proceeding from two or more persons in respect of any one of whom the proceedings are referred to the Sessions Judge under sub -section (2) such reference shall also include the case of any other of such persons who has been order to give security, and the provisions of sub-sections (2) and (3) shall, in that event, apply to the case of such other person also, except that the period (if any) for which he may be imprisoned, shall not exceed the period for which he was ordered to give security. (5) A Sessions Judge may in his discretion transfer any proceedings laid before him under sub -section (2) or sub-section (4) to an Additional Sessions Judge or Assistant Sessions Judge and upon such transfer, such Additional Sessions J udge or Assistant Sessions Judge may exercise the powers of a Sessions Judge under this section in respect of such proceedings. (6) If the security is tendered to the officer in charge of the jail, he shall forthwith refer the matter to the Court or Magistrate who made the order, and shall await the orders of such Court or Magistrate. (7) Imprisonment for failure to give security for keeping the peace shall be simple. (8) Imprisonment for failure to give security for good behaviour shall, where the proceedi ngs have been taken under section 108, be simple, and, where the proceedings have been taken under section 109 or section 110, be rigorous or simple as the Court or Magistrate in each case directs.