
61 Cal.App.2d 666 (1943)
In re JOSEPH WEINTRAUB, on Habeas Corpus.
Crim. No. 1856. 
California Court of Appeals. Third Dist.  
Dec. 9, 1943.
 Joseph Weintraub in pro. per., for Petitioner.
 Robert W. Kenny, Attorney General, and T. G. Negrich, Deputy Attorney General, for Respondent.
 THOMPSON, J.
 By means of habeas corpus the petitioner, appearing in proper person, seeks to obtain his release from custody as a prisoner at Folsom State Prison. He contends that he was convicted, without due process of law, of the misdemeanor of having in his possession "a preparation of morphine" without having procured a physician's prescription *668 therefor, contrary to the provisions of section 11160 of the Health and Safety Code, with relation to the use of narcotics. He claims that the lack of due process consisted of pronouncing sentence against him in his absence and in the absence of his attorney, contrary to the provisions of section 987 of the Penal Code, and article I, section 13, of the Constitution of California.
 The attorney general filed a return to the petition denying the material allegations thereof. The case was heard upon affidavits filed, certified copies of the minute orders of the trial, the medical certificates of physicians at the state prison to which he was committed, and the oral examination of the petitioner.
 The record shows that the petitioner was charged by information filed in the Superior Court of Los Angeles County with the misdemeanor of having "in your possession on or about the 2nd day of December, 1941, a preparation of morphine" contrary to the provisions of section 11160 of the Health and Safety Code; that he was also charged with the prior conviction of a felony, which was subsequently dismissed; that upon arraignment on December 26, 1941, the court appointed the Public Defender of Los Angeles County, who at all proceedings of the trial appeared with the defendant in open court and represented him as his attorney, as certified copies of the court minutes clearly show; that on March 20, 1942, when the defendant, his said counsel and the district attorney were present in open court, an application for probation was duly made, and the cause was continued for sentence to April 3, 1942; that on the last mentioned date, in the presence of the defendant and his said attorney, the application for probation was denied, and the defendant was then duly sentenced to imprisonment at San Quentin State Prison "for the term prescribed by law." No appeal was taken from that judgment. The defendant was forthwith delivered to the Warden of San Quentin State Prison for imprisonment, pursuant to the judgment of conviction and sentence, and subsequently transferred, as authorized by law, to Folsom State Prison, where he has remained and is now confined by virtue of the same judgment and sentence.
 [1] We are satisfied there is no merit in this petition for a writ of habeas corpus. The judgment is valid on its face. At the hearing of this proceeding the petitioner was sworn as a witness in his own behalf and testified without objection to many improbable circumstances which are refuted by the *669 record. Among other statements to which he testified was that he employed a named attorney to represent him in the trial of his case but that this attorney was later called East. Said lawyer filed a verified affidavit in which he positively avers that he was never requested by the defendant, or any other person, to represent him, and that he did not in fact represent him as his attorney at any of the hearings of said charge of violating the narcotic laws. Petitioner testified that he then employed another named attorney and that said lawyer appeared in court in an intoxicated condition, whereupon the court committed him to jail for contempt, and continued with the subsequent proceedings without appointing another lawyer to represent him; that the defendant was not represented by counsel at the time of pronouncing sentence, or at any of the other proceedings of his case. The minutes of the court contain no reference to either of said attorneys in connection with said case. On the contrary, the minutes of court specifically show the appointment, at the time of arraignment, without objection, of the Public Defender of Los Angeles County, to represent the defendant as his attorney and that said officer did appear with the defendant and represent him in court at each and every subsequent proceeding therein.
 The petitioner further testified that neither he nor his attorney was present in court at the time sentence was pronounced. The certified copy of the judgment which was rendered April 3, 1942, signed by a judge in high standing of the Los Angeles Superior Court, recites the fact that "the defendant was present in court with his counsel, R. F. Bird, Esq., Deputy Public Defender of Los Angeles County," when the sentence was pronounced.
 The petitioner further testified that the officers savagely beat him, breaking his jaw, both wrists and several ribs, and that he was in that condition when he arrived at State Prison. The certificate of the State Prison medical expert, which was filed on this hearing, shows that a physical and mental examination of the defendant was made May 5, 1942, after his arrival at San Quentin, in which report no suggestion of the existence of broken wrists, jaw or ribs appears. On the contrary, all that appears in the report in that regard is that the defendant "is a psychopathic personality, alcoholic, drug addict, with poor and insufficient insight."
 From the oral and documentary evidence adduced on this hearing we are satisfied that it is true, and so find, that *670 the court duly appointed an attorney to represent the defendant at the time of his arraignment, as provided by section 987 of the Penal Code, and that he was fully and fairly represented by that lawyer in all subsequent proceedings in his case; that both the defendant and his attorney were present in court at the time judgment and sentence were pronounced, and that the defendant was not deprived of due process of law in any of said proceedings against him.
 [2] The petitioner complains of the failure of the prison board to fix or determine the term of his imprisonment pursuant to section 3026 of the Penal Code, notwithstanding the fact that he has already served some eighteen months of imprisonment. It is true that petitioner's term of imprisonment has not yet been determined by the board. The reason assigned by the board for not doing so is that under rules of the prison board, regularly adopted and in force, it is the practice of the board, with respect to prisoners committed for offenses punishable by imprisonment for terms in excess of two years without prescribing a minimum penalty therefor, and when the prisoner has also suffered a prior conviction of a felony, not to fix his term definitely until after two years have elapsed from the commencement of his imprisonment. In the present case it appears that the petitioner had been previously convicted of a felony, although that charge in the information was dismissed.
 In this case no minimum penalty is prescribed for the offense of which the petitioner was convicted. He was convicted under section 11160, division 10, chapter 3 of the Health and Safety Code, which section prescribes no penalty. But section 11712 of that said chapter provides that:
 "Any person convicted under this division for having in possession any narcotic, or of violating the provisions of sections 11530, 11531, or 11555, shall be punished by imprisonment in the county jail for not more than one year, or in the State prison for not more than six years." (Italics added.)
 The foregoing statute authorizes the court, in its discretion, to impose the penalty for violation of that statute of imprisonment in the state prison. The court did so in this case. In fixing the term of imprisonment the board is controlled by the provisions of section 11712 of the Health and Safety Code, which prescribes a maximum penalty of six years.
 Regardless of whether the board is authorized to defer the fixing of a term of imprisonment for two years after the commencement thereof, on account of the prisoner's having *671 suffered a prior conviction of a felony, or otherwise, which question is unnecessary for us to determine, that failure is not ground for the release of the petitioner in this case because it appears that he has not completed the service of his sentence. He is nevertheless lawfully restrained of his liberty. He is still held under a valid unexpired judgment of imprisonment. The indeterminate sentence, in legal effect, is a commitment for the maximum term prescribed by law, which in the present case is six years. (People v. Sama, 189 Cal. 153 [207 P. 893]; In re Lee, 177 Cal. 690, 693 [171 P. 958].) [3] In the absence of evidence of the invalidity of the judgment, or the shortening of the maximum term by order of the prison board or the application of credits for good behavior, we must assume on habeas corpus that the prisoner is lawfully imprisoned for the maximum period prescribed by the statute. In the present case the credit for good behavior is insufficient to entitle the petitioner to his discharge.
 It is true that section 3020 of the Penal Code provides that the prison board "may determine and redetermine, after the expiration of six months, from and after the actual commencement of imprisonment, what length of time, if any, such person shall be imprisoned."
 [4] Assuming, as the petitioner contends, that the foregoing language requires the prison board to fix the term of a prisoner, promptly "after the expiration of six months, from and after the actual commencement of imprisonment," which we do not concede, that omission does not invalidate the judgment of commitment, nor entitle the petitioner to his discharge from custody in this habeas corpus proceeding. He is still lawfully held in custody. [5] The fixing of the term of imprisonment by the board is not judicial in its nature. (21 Cal.Jur. 458, sec. 16.) [6] The writ of habeas corpus is not the proper remedy to compel a ministerial board to perform a duty required by law. There is no merit in the petitioner's foregoing contention which entitles him to be discharged on this writ of habeas corpus.
 [7] The office of the writ of habeas corpus is ordinarily confined to the determination of the legality of the custody of a prisoner, by inquiry into the jurisdiction of the court and the validity of the process upon its face, and to review anything which may have transpired after the issuance of the commitment rendering it invalid. [8] Habeas corpus is not designed *672 as a means of retrying issues of fact or errors occurring in the course of trial which may be determined on appeal or by a motion to vacate the judgment.
 [9] The mere failure to appoint an attorney to represent the defendant, as provided by section 987 of the Penal Code may be waived. [10] That omission does not furnish ground for the discharge of a petitioner upon habeas corpus. (In re Connor, 16 Cal.2d 701, 705 [108 P.2d 10]; In re Gutierrez, 1 Cal.App.2d 281 [36 P.2d 712]; In re Maldonado, 97 Cal.App. 288 [275 P. 495]; 13 Cal.Jur. 236, sec. 17.)
 The writ is discharged.
 Schottky, J. pro tem., and Adams, P. J., concurred.
