Opinion by
Rhodes, P. J.,This is an appeal from the order of the Court of Common Pleas of Lycoming County, discharging rule and refusing relator’s petition for a writ of habeas corpus.
Relator is serving a life sentence in the Eastern State Penitentiary imposed under the provisions of section 1108 of The Penal Code, Act of June 24, 1939, P. L. 872, 18 PS §5108, and known as the Habitual Criminal Act.1
Relator’s relevant criminal record, which is in the Court of Oyer and Terminer and General Jail Delivery of Lycoming County, is as follows:
(1) On August 21, 1942, he pleaded guilty to a bill of indictment charging burglary at No. 78, June Sessions, 1942, and was sentenced to 45 days imprisonment in the Lycoming County Jail.
(2) On January 21, 1943, he pleaded guilty to bills at Nos. 76 and 78, December Sessions, 1942, each charging burglary, and was sentenced on each bill to concurrent sentences of four months in the Lycoming County Jail.
*131(3) On June 15, 1949, lie pleaded guilty to bill at No. 23, March Sessions, 1949, charging attempted burglary, and was sentenced to fifteen months in the Allegheny County Workhouse.
(4) On September 4, 1951, he pleaded guilty to bill at No. 87, June Sessions, 1951, charging entering with intent to commit larceny, and was sentenced to two months’ imprisonment in the Lycoming County Jail.
(5) On February 25, 1952, he was indicted on a bill at No. 27, December Sessions, 1951, charging robbery with accomplice, and also on a bill at No. 26, December Sessions, 1951, charging burglary. He pleaded guilty to the robbery indictment, and after trial was found guilty by a jury on the burglary indictment. He was sentenced to consecutive terms of imprisonment of not less than 10 years nor more than 20 years in the Eastern State Penitentiary upon the bills.
Relator also, on September 21, 1944, pleaded guilty to bills at Nos. 71 and 72, June Sessions, 1942, charging larceny and larceny of a motor vehicle, respectively, and was sentenced to Eastern State Penitentiary for a period of not less than two years nor more than four years. He had served the minimum on September 5, 1946, and was then released on parole. On July 31, 1947, he was returned to the penitentiary as a technical parole violator, and he completed serving his maximum sentence on September 5, 1948.
On May 21, 1952, the court vacated the sentences imposed on bills Nos. 26 and 27, December Sessions, 1951, and sentenced the relator to life imprisonment in accordance with the Habitual Criminal Act.
On October 28, 1952, relator filed his petition for a writ of habeas corpus in the Court of Common Pleas of Lycoming County. A rule to show cause was issued, *132answers were filed, and a hearing was held at which relator was present and represented by counsel.
Relator’s principal contention is to the effect that in the proceeding attendant upon the imposition of the life sentence under the provisions of the Habitual Criminal Act, there was a failure to comply with that portion of section 1108 (d) of the Act, 18 PS §5108 (d), which provides that “it shall be the duty of the district attorney of the county in which the last conviction was had to file a complaint accusing the said person [the convicted fourth offender] of such previous convictions, and to serve a copy of such information upon the defendant thirty (30) days before taking any further proceedings in court as hereinafter set forth.”
Admittedly no such complaint was filed, and hence no copy thereof was served upon the relator. Explanatory of this omission is the testimony of relator’s former counsel, who represented him at the time of his convictions at Nos. 26 and 27, December Sessions, 1951, and at the proceeding under the Habitual Criminal Act. He testified at the habeas corpus hearing in the court below, on relator’s behalf, that it was at relator’s insistence and against counsel’s advice that the proceedings were initiated whereby the sentence of life imprisonment was imposed. According to this witness, the explanation offered by relator for such an unusual request was relator’s statement that “I have been in the Pen before, and I am acquainted with boys who had life sentences and they told me they got out in fifteen years on a life sentence.”
At the proceeding under the Habitual Criminal Act, a waiver2 signed by relator was filed, in which relator *133waived -the requirement as to the filing of the information specified in the Act as well as all other rights he might have by virtue of the Act. In such written waiver he admitted that he was the person who had been charged with and convicted of the offenses heretofore enumerated. In addition to this, at such proceeding he verbally waived any requirement for the filing of a formal information, as well as his right to thirty days’ notice of the filing thereof. He there also orally acknowledged his identity as the person formerly convicted of the crimes above set forth. The court properly advised him of the nature of the proceedings against him and of his rights under the Act.
Relator now contends, however, that the filing of the complaint and the giving of notice thereof as provided in the Habitual Criminal Act were provisions that could not be waived. In substance, his argument is that the action of the trial court in permitting him to make such waiver and in proceeding under the Act without the complaint being filed and due notice thereof given to relator constituted a denial of due process.
*134We do not agree with this contention. The general principles governing such a situation are set forth in 14 Am. Jur., Criminal Law, §119, p. 848, as follows: “The rights guaranteed to one accused of crime fall naturally into two classes — those in which the state, as well as the accused, is interested, and those which are personal to the accused. Those of the first class generally cannot be waived; those of the second class generally may be. If there is no constitutional or statutory mandate and no public policy prohibiting, an accused may waive any privilege which he is given the right to enjoy. In some states the accused may waive any statutory or constitutional right. In fact, the trend of modern authority is in favor of the doctrine that a party in a criminal case may waive irregularities and rights, whether constitutional or statutory, very much the same as in a civil case.”
While the “due process” clause of the Fourteenth Amendment requires provision for the essential rights of notice and a hearing, or opportunity to be heard, before a competent tribunal, it does not prohibit the waiver or bar the forfeiture of such rights. Frank v. Mangum, 237 U. S. 309, 338-344, 35 S. Ct. 582, 59 L. Ed. 969; Yakus v. United States, 321 U. S. 414, 444, 64 S. Ct. 660, 88 L. Ed. 834, 859; Sunal v. Large, 332 U. S. 174, 181-184, 67 S. Ct. 1588, 91 L. Ed. 1982, 1988-1990; Brown v. Allen, 344 U. S. 443, 486, 487, 73 S. Ct. 397, 97 L. Ed. 469, 504, 505. In McCandless v. District Court of Polk County, 61 N. W. 2d 674, 678, it was stated: “It has been well said that the rights given the accused by the constitution and our statutes are shields, not weapons, and being so intended by the legislature, we must give meaning to that intent. If this is true, what must one do in order to use the shield? Must the state carry it for him? We think not:” .......
*135It has been stated that a defendant may waive the statutory requirements of a separate proceeding charging him as a second or subsequent offender even though such proceeding is criminal in nature. 24 C.J.S., Criminal Law, §1969 (c), p. 1168. In People v. Gowasky, 244 N. Y. 451, 155 N.E. 737, 58 A.L.R. 9, the defendants appealed from the judgment sentencing them to life imprisonment as fourth offenders. They complained that the record failed to show.whether the judge informed them of their right to be tried by a jury as to the truth of the charge against them. The New York Court of Appeals in holding that the defendants had waived such a requirement stated with reference to such omission (page 741 of 155 N.E.) : “This should have been done because the statute says so. It is not a formality which is to be brushed aside as unnecessary. It is a requirement, however, which may be waived either expressly or by implication.. Even a constitutional provision for the benefit of a prisoner may be waived. Diaz v. United States, 223 U. S. 442, 32 S. Ct. 250, 56 L. Ed. 500, Ann. Cas. 1913C, 1138.”
The waiver in the present case was understandingly made by the relator with full knowledge of his rights. In fact it was made at his insistence. He had the benefit of counsel at the time. We find no justification for his present complaint. Cf. Com. ex rel. Dugan v. Ashe, 342 Pa. 77, 19 A. 2d 461, certiorari denied 314 U. S. 610, 62 S. Ct. 69, 86 L. Ed. 491, 314 U. S. 712, 62 S. Ct. 294, 86 L. Ed. 567; rehearing denied 347 Pa. 588, 33 A. 2d 32.
Relator now attempts to question the admission of certain confessions which were introduced in evidence at his trial at No. 26, December Sessions, 1951, on the grounds that they were obtained by the use of force and intimidation and were.otherwise inadmissible.. The question a,s to whether, such confessions were volun*136tary was submitted for the jury’s consideration at the trial of the case. The writ of habeas corpus cannot be used to re-examine matters of fact passed on by the jury at the trial. Com. ex rel. Geiger v. Burke, 371 Pa. 230, 89 A. 2d 495, certiorari denied 344 U. S. 859, 73 S. Ct. 98, 97 L. Ed. 666. Moreover, on the issue there was a compliance with the requirements of due process. Com. ex rel. Master v. Baldi, 166 Pa. Superior Ct. 413, 426, 72 A. 2d 150, allocatur refused 166 Pa. Superior Ct. xxiv, certiorari denied 340 U. S. 866, 71 S. Ct. 88, 95 L. Ed. 632.
The rule is firmly established that a writ of habeas corpus can never be used as a substitute for an appeal. Com. ex rel. Marelia v. Burke, 366 Pa. 124, 126, 75 A. 2d 593. This rule has application to relator’s contention that the life sentence was unjustifiably severe in the light of the nature of the crimes constituting his prior record. Section 1108 (d) of the Habitual Criminal Act, 18 PS §5108 (d), provides that such sentence shall be reviewable on appeal by the appellate court, not only as to the alleged legal errors but also as to the justice thereof. And it further provides that where the defendant is indigent the costs of appeal together with reasonable counsel fee shall be paid by the Commonwealth. We will not review in a habeas corpus proceeding the exercise of discretion by the sentencing judge. Com. ex rel. Gryger v. Burke, 173 Pa. Superior Ct. 458, 470, 98 A. 2d 380. This is especially true where, as here, the statute provides for a review on appeal both as to alleged legal errors and as to the justice of the sentence. In any casé, one provision for corrective process is sufficient to satisfy the requirements of due process.
Relator also argues that- the procéeding under the Habitual Criminal Act was improperly invoked- because moré'than five years'-expired^ bétwéén the time- of-his *137convictions at Nos. 78 and 78, December Sessions, 1942, and the commission of the crime for which he was convicted at No. 23, March Sessions, 1949. This argument has no merit. Under section 1108 (b) of the Act, 18 PS §5108 (b), it is only the last offense which must have been committed within five years after the prior offense. Com. ex rel. Foster v. Ashe, 336 Pa. 238, 8 A. 2d 542. And, in any event, under section 1108 (c) 18 PS §5108 (c), in computing the period of time between convictions, any period of servitude by a person in a penal institution, within or without this Commonwealth, shall not be included in the computation of any five-year period. During the lapse of six years, one month, and twenty-nine days between the convictions at Nos. 76 and 78, December Sessions, 1942, and the commission of the crime for which he was convicted at No. 23, March Sessions, 1949, relator spent over three years in confinement in the penitentiary on the sentence imposed on the intervening larceny convictions at Nos. 71 and 72, June Sessions, 1942.
The order of the court below is affirmed.
As to its constitutionality, see Com. ex rel. Foster v. Ashe, 336 Pa. 238, 8 A. 2d 542; Gryger v. Burke, 334 U. S. 728, 68 S. Ct. 1256, 92 L. Ed. 1683, rehearing denied 335 U. S. 837, 69 S. Ct. 13, 93 L. Ed. 389; United States ex rel. Collins v. Claudy, 106 F. Supp. 367, reversed on other grounds 204 F. 2d 624.
The following is a copy of relator’s waiver:
I, NATHANIEL FIRMSTONE, being fully informed by my attorney, George M. Hess, Jr., Esq., and the Court, of my rights *133under the Act of June 24, 1939, P. D. S72, Section 1108, sometimes referred to as the Habitual Criminal Act, do hereby waive any requirements for a formal indictment or information alleging prior offenses.
I hereby state that I am the person who was charged and convicted of the following crimes:
No. 78 June Sessions, 1942, burglary
No. 76 December Sessions, 1942, burglary
No. 78 December Sessions, 1942, burglary
No. 23 March Sessions, 1949, attempted burglary
No. 87 June Sessions, 1951, entering with intent to steal
No. 27 December Sessions, 1951, robbery with accomplice
No. 26 December Sessions, 1951, burglary
I hereby waive any other rights I may have by virtue of the Act of June 24, 1939, P. D. 872, Section 1108.
(Sig.) Nathaniel Firmstone