Opinion by
Winkler, J.§ 796. Habeas corpus; rules relating to. Appellant' was fined for contempt of court by the county court of Austin county, and an attachment .issued to Waller county commanding his arrest, etc. Appellee, sheriff of the latter county, arrested him under the attachment, and appellant applied to the judge of the county court of Waller county for a habeas corpus, which writ wTas granted, and upon a hearing thereof he was remanded to the custody of the sheriff, from which judgment this appeal was prosecuted. Held, the record contains neither bill of exceptions, statement of facts or assignment of errors. Judging from the case as presented, there was no error in the proceedings and action of the county judge in remanding appellant to the custody of the sheriff, in order that the process by which he held him might be permitted to have effect and take its course. Whatever defense he had to make, the law permitted him to *440make before the court from which the process emanated.
March 23, 1881.“ The habeas corpus is undoubtedly an immediate remedy for every illegal imprisonment; but no imprisonment is illegal when the process is a justification to the officer; and process, whether by writ or warrant, is legal whenever it is not defective in the frame of it, and has issued in the ordinary course of justice, from a court or magistrate having jurisdiction of the subject matter, though there have been error or irregularity in the proceedings previous to the issuing of it.” [Com. v. Lecky, 1 Watts, 66; Hurd on Hab. Corp. 340.] Whether the judgment or execution be voidable is a point which the sheriff is never permitted to raise; and having arrested the party, he is bound to keep him until he is discharged by due course of law. [Cable v. Cooper, 15 Johns. 152.] It was the duty of the sheriff to convey the appellant to the county and before the court from which the process emanated, that being the proper tribunal for the appellant to •answer before, and habeas corpus was not the proper remedy of appellant.
'Affirmed.