Day was tried at the August term, 1930, of Milton superior court, in two cases, one for stabbing, and the other for transporting intoxicating liquor. In the trials of these cases Judge C. C. Pittman of the Cherokee Circuit presided in the place of Judge John S. Wood of the Blue Bidge Circuit. Day was convicted in both of these cases. In the stabbing case a fine of $100, to include the costs, was imposed upon him, and in the liquor case a fine of $150 was imposed. Sentences were upon prepared forms providing for fines and alternative chain-gang sentences, with blanks therein for the insertion of the amounts of the fines and the number of months the defendant was to serve on the chain-gang. These blanks for the number of the months were not filled out at the time the sentences were signed by the judge. On October 23, 1930, the sheriff mailed these sentences to Judge Pittman at Cartersville, and called his attention to the fact that the blanks for the insertion of the number of months which the defendant had to serve on the chain-gang under the alternative sentences had not-been filled in. Thereupon Judge Pittman, at Cartersville, filled the blank in the alternative sentence in the stabbing case, by inserting therein the figure four before the word “months,” and in the liquor case by inserting in the blank .the figure nine before the word “months,” and then returned the sentences so amended to the sheriff of Milton County. At that time the August term, 1930, of Milton superior court had not been adjourned. On the hearing of the application for habeas corpus the applicant introduced evidence tending to show that the oral sentences pronounced by the trial judge in these cases did not pro*469vide for any alternative chain-gang sentences. On the other hand the respondent introduced evidence, including the testimony of Judge Pittman, that the sentences pronounced by the judge in sentencing the defendant in these cases provided for alternative chain-gang sentences.
On October 31, 1930, Day brought before Judge Wood his application for the writ of habeas corpus against A. W. Smith, sheriff. The applicant based his right to this writ upon the ground that the sheriff was illegally restraining him of his liberty by holding him as a prisoner in the common jail of that county under the 'alternate sentences above referred to. He asserted that the chain-gang portions of these sentenses were void, because the amendments thereto by filling in the blanks for the number of months of .service in the chain-gang were without authority off law; because the judge had no jurisdiction at that time over these cases; and because these amendments were made without notice to him and an opportunity to be heard. He further alleged that he had been arrested by the sheriff of Terrell County, at the instance of the sheriff of Milton County, under said sentences; that thereupon he sued out, on October 25, 1930, a habeas-corpus proceeding before the ordinary of Terrell County, which was tried before the clerk of the superior court of that county, acting in the place of the ordinary, on October 29, 1930, by reason of the severe illness of the ordinary; that the sheriff of Milton County was represented by his attorney in said proceeding; that on the hearing of this application for habeas corpus these sentences were introduced in evidence by counsel for the sheriff of Milton County; that the question was tried upon its merits; and that at the conclusion of the trial the clerk of the superior court, acting in stead of the ordinary, rendered a judgment sustaining the writ of habeas corpus, and discharging petitioner from custody under said sentences. Applicant attaches to his application in this case copies of the habeas-corpus proceedings and the judgment discharging him. This judgment was rendered on Oe~. tober 29, 1930. Applicant sets up that the judgment of the clerk of the superior court of Terrell County, acting in the place of the ordinary, discharging him from confinement under said'sentences, is a complete' bar to their enforcement. The defense to the habeascorpus proceedings before the clerk of the superior court, acting in the place of the ordinary of Terrell County, was defended in *470fact by the sheriff of Milton County and by his counsel. Applicant further alleges that after being so discharged, the sheriff of Milton County arrested him under warrants issued by a justice of the peace of Milton County, and under those warrants took him back to Milton County and lodged him in the jail of that county. The justice’s warrants upon which applicant was so arrested were present in the possession of the sheriff of Milton County at the time of the trial of the habeas-corpus proceeding in Terrell County; and the applicant insists that they should have been produced upon that trial as one of the causes of his detention by the sheriff of Terrell County at the instance of the sheriff of Milton County; and that the sheriff of Milton County is concluded by the judgment of the court of ordinary of Terrell County, as if he had produced said warrants. The applicant pleads his complete discharge from said two sentences and from said warrants.
In his answer the sheriff set up that he was holding the applicant under the two sentences above referred to, and under two justice-court warrants, one charging him with larceny, and the other charging him with larceny of a certain heifer. On the trial of this case the applicant tendered in evidence the habeas-corpus proceedings instituted before the ordinary of Terrell County and the judgment rendered therein discharging him from custody under the sentences of Milton superior court, above referred to. Counsel for the respondent objected to the admission of this evidence, upon the ground that it was irrelevant and immaterial; and the judge sustained said objection and rejected said evidence. To this ruling the applicant excepted. After hearing the evidence the judge refused to discharge the applicant, and remanded him to the custody of the sheriff. To this judgment the applicant excepted.
1. The first question for decision in this case is, whether the judge erred in rejecting the habeas-corpus proceedings before the ordinary and clerk of the superior court of Terrell County, and the judgment rendered therein discharging the applicant from arrest under the sentences imposed upon him in the two cases in Milton superior court, upon the ground that they were irrelevant and immaterial. Any person restrained of his liberty, under any pretext whatever, may sue out a writ of habeas corpus, to inquire into the legality of such restraint. Penal Code, § 1291. The *471petition for this writ may be presented to the judgfe of a city court established upon the recommendation of a grand jury, or to the judge of the superior court of the circuit where the illegal detention exists, or to the ordinary of the county where such illegal detention exists, except in cases of capital felonies, or where a person is held for extradition under warrant of the Governor. Penal Code, § 1293. When an ordinary is disqualified by sickness, or is from other cause incapacitated to act in any case, the county-court judge or city-court judge, and, if there be no such courts, then the clerk of the superior court of such ordinary’s county may exercise all the jurisdiction of the ordinary in such case, and in such event it shall not be necessary for the ordinary to call in the ordinary of an adjoining county. Civil Code (1910), § 4785. In this case the ordinary of the county, where the applicant was restrained of his liberty by the sheriff thereof, instituted this proceeding by issuing the writ of habeas corpus. Thereafter he became sick and was unable to preside at the hearing. Thereupon the clerk of the superior court of the county assumed jurisdiction of the case, and passed an order reciting the necessary jurisdictional facts to entitle him to preside. This order recited that the ordinary was disqualified from acting, by sickness, that there was no county-court judge or city-court judge in the county, and that for this reason the clerk of the superior court of the county exercised the jurisdiction of the ordinary in this ease. The proviso in the above section is broad enough to authorize the clerk of the superior court of the county of the ordinary to exercise all the jurisdiction of such ordinary in any case where the ordinary is disqualified by sickness or is from ^ny other cause incapacitated to act in any case pending before him. In such case it is not necessary for the ordinary to endorse his disqualification upon the papers. Such endorsement is required only in cases when the ordinary is disqualified to pass upon any matter presented to him as such ordinary, and the purpose is to call in the ordinary of an adjoining county to exercise jurisdiction in the case. See Little v. McCalla, 20 Ga. App. 324 (93 S. E. 37).
In this case the ordinary of Terrell County had jurisdiction to grant the writ of habeas corpus; and when he became incapacitated from sickness to hear the case upon the return of the respondent to the writ so granted, the clerk of the superior court of Terrell *472County was authorized to exercise all the jurisdiction of the ordinary in this proceeding. As we have seen, the ordinary has jurisdiction in all habeas-corpus cases, except in capital felonies and in cases where persons are held for extradition under warrant of the Governor. It likewise follows that when the ordinary grants the writ of habeas corpus in a case not involving a capital felony or a warrant issued by the Governor in an extradition case, and becomes incapacitated by sickness to preside on the hearing of such case, the clerk of the superior court has jurisdiction to hear and determine the case and any issue raised therein by the return of the respondent to the writ of habeas corpus. So in this case the ordinary had jurisdiction to issue the writ of habeas corpus; and the clerk of the superior court of Terrell County had jurisdiction to hear the case upon its merits. Both the ordinary and the clerk of the superior court had jurisdiction of the subject-matter and of the respondent. This being so, what force and effect shall be given to the judgment of the clerk discharging the applicant from restraint at the hands of the sheriff of Terrell County under the sentences imposed upon the applicant in the cases in which he was convicted in Milton superior court ? The ordinary and the clerk of the superior court of Terrell County had jurisdiction of the subject-matter. The illegal restraint of the applicant was being done in that county. This gave the ordinary jurisdiction to issue the writ in that county. Simmons v. Georgia Iron & Coal Co., 117 Ga. 305 (43 S. E. 780, 61 L. R. A. 739). The validity of the alternative portions of these sentences was attacked upon the ground that they were void for the reason that no alternative sentences had been imposed upon the defendant, and because the amendments of the sentences, imposing alternative sentences of service on the chain-gang, by the trial judge, who was the judge of another circuit, were void, first, because his authority ceased when he signed sentences imposing fines alone upon the defendant; and second, because these amendments were made by the judge at Cartersville, Georgia, and in a different circuit from that in which he presided when these sentences were imposed. So the question whether the alternative portions of these sentences were void was necessarily passed upon by the clerk when he decided the case upon its merits. He decided this matter in favor of the applicant, and necessarily discharged the applicant under his -contention that the alternative portions of these sen*473tences as amended were void. No exception was taken to the judgment discharging the applicant from restraint under these sentences. Here we have a tribunal, with jurisdiction and authority to pass upon and decide all issues of law and fact involved in the habeas-corpus case in Terrell County, which' sustained the contention of the applicant that the alternative portions of these sentences under which he was being restrained of his liberty were illegal and void, no direct exception to this judgment being taken by the respondent in that proceeding.
In the present proceeding it was insisted that the portions of the sentences were voidable alone, and could be amended by inserting in the blanks left therein the number of months which the defendant had to serve on the chain-gang. This raised the issue of law whether these portions of these sentences were void, which issue was passed upon by the habeas-corpus judge in the proceeding in Terrell County. It amounts, in effect, to an effort to attack, in a collateral proceeding, the judgment of the judge in that proceeding. This, in our opinion, can not be done. A judgment in a habeascorpus proceeding, being in this State subject to review, is final until reversed'; and where the legality of the same cause of imprisonment is twice drawn in question between the same parties by successive writs of habeas corpus before the same court or before different courts of competent original jurisdiction, the judgment on the former writ may be set up in bar of defense to a second habeascorpus proceeding, such defense setting up and asserting the legality of the restraint which had been passed on adversely to the respondent in the first proceeding. The matter will be deemed res adjudicata as to all points which' were necessarily involved in the general question of the legality or illegality of the arrest and detention. Perry v. McLendon, 62 Ga. 598. The principle of res judicata has been held applicable to proceedings in habeas corpus involving an inquiry into and a determination of the rights of conflicting claimants to the custody of a minor child. Pryor v. Pryor, 164 Ga. 7 (137 S. E. 567). Where a judge in a habeascorpus case awards custody of a minor child to the respondent, such judgment may be set up in bar to another habeas-corpus proceeding between the same parties for the custody of the child, based upon the same facts. Collard v. McCormick, 162 Ga. 117 (2) (132 S. E. 757). In the cases cited the rights of the applicants *474arose in civil proceedings. We have found no case in this State dealing with the conclusiveness of a judgment in a habeas-corpus case discharging a person held under a sentence in a criminal case. We see no reason why such a judgment should not be conclusive in such a case. As a judgment iira habeas-corpus case in which the applicant seeks to be discharged from restraint under a sentence in a criminal ease, which he asserts is illegal and void, can be reviewed, we see no reason why the judgment in such a case should not be conclusive in a case where the State, through one of its officers, is a party and the applicant for the writ is the other party. In such' a case the same principle should be applicable as in a case where the struggle is between party and party. We know of no reason which differentiates the conclusiveness of a judgment in a habeascorpus case, wherein the validity of a sentence is involved, from the conclusiveness of a judgment in a habeas-corpus case between private parties. We agree with what was said by Judge Bleckley in Perry v. McLendon, supra, to wit: “A single judgment will serve to hang a man, if left to stand unreversed. He can not have trial after trial to ascertain if he is guilty, and determine whether he is to be executed. One complete trial, fair and legal, will carry him out of the world; and why should it not suffice to keep him in jail until some new right to a deliverance has arisen?”
The principle of the conclusiveness of judgments in habeas-corpus cases has been recognized and enforced in both classes of cases. An order or judgment discharging a person in habeas-corpus proceedings is conclusive in his favor that he is illegally held in custody, and is res judicata of all issues of law and fact necessarily involved in that result. A person discharged in habeas-corpus proceedings can not lawfully be again arrested, imprisoned, restrained, or kept in custody for the same cause, or under the same sentence. Mc-Conologue’s Case, 107 Mass. 154. So where a probate court discharges a person because no offense was alleged for which he could be prosecuted, its order not only restores him to his liberty, but terminates the pending proceeding against him. In re Crandall, 59 Kan. 671 (54 Pac. 686). The discharge of a party, under a writ of habeas corpus, from the process under which he is imprisoned, discharges him from further confinement under the process. Ex Parte Milburn, 9 Peters, 704, 709 (9 L. ed. 280). Where a person has been discharged by a commissioner on a writ of habeas *475corpus, the sheriff has no authority to rearrest and imprison him upon the same sentence upon which he was imprisoned the first time, and such rearrest is unlawful. In re Crowe, 60 Wis. 349 (19 N. W. 713). See 20 C. J. 178 [§ 200] (2), [§ 201] (b).
It is true that the respondents in the two proceedings were different persons, the respondent in the first writ being the sheriff of Terrell County, and the respondent in the second writ being the sheriff of Milton County. These persons were not parties in their private capacities, but in their official capacities, as officers of the State and as representatives of the State. The State and the people were represented by these two officers. Besides, such a proceeding has been analogized to a proceeding in rem. Simmons v. Georgia Iron & Coal Co., supra. While the judgment discharging the applicant from confinement under these sentences in the habeascorpus proceedings in Terrell County might be erroneous for the reason that these sentences could be so amended, under proper proceedings, as to fix his terms of service in the chain-gang, under the decisions of our courts (Merritt v. State, 122 Ga. 752, 50 S. E. 925; Tyler v. State, 125 Ga. 46, 53 S. E. 818; Pulliam v. Jenkins, 157 Ga. 18, 121 S. E. 679; Stansell v. State, 30 Ga. App. 658, 119 S. E. 419), we think that judgment, being reviewable, was conclusive upon the question of the legality or illegality of the sentences under which he was held; and that for this reason the trial judge erred in rejecting the record and the judgment in the habeas-corpus proceedings in Terrell County.
While we hold that the applicant should have been discharged from restraint under these sentences, he should not have been fully discharged from custody, for the reason that the sheriff set up that he held the applicant under certain justice-court warrants which had been issued by a justice of the peace in Milton County, charging the applicant with criminal offenses. He should have been remanded to the custody of the sheriff under these warrants, so that they could have been disposed of acctírding to law.
Judgment reversed in part and affirmed in pari.
All the Justices concur, Bussell, G. J., specially..