Petitioner herein applied for a writ of habeas corpus, alleging in his petition that he was being unlawfully “imprisoned, detained, confined and restrained of his liberty” by the marshal of the town of Lawndale, San Mateo County, under a charge of misdemeanor, to wit: Opening and keeping open on Sunday a place of business for the manufacture and sale of grave stones and monuments, in violation of an ordinance of said town, which ordinance, petitioner claims, is unconstitutional. The writ was issued, and in response thereto the marshal filed a return, from which it appears that at the time the application for this writ was made petitioner was neither imprisoned nor involuntarily restrained of his liberty.
With respect thereto, the return discloses that on the day the complaint was filed against petitioner in the town recorder’s court, which was about two weeks prior to the filing of the application for this writ, the recorder ordered petitioner released “on his own recognizance,” pending trial; and nothing further is set forth in the return to show that he was thereafter taken or ordered into custody. Moreover, the record does not show with any degree of certainty that petitioner was ever placed under arrest on said charge. In this connection the return sets forth that “by virtue of a complaint and a warrant of arrest, copies of which are hereunto annexed, marked respectively ‘Exhibits A and B,’ petitioner herein Nello Boeci was accused of violation of ordinance 28” of said town. But “Exhibit B” does not purport to be a warrant of arrest; it is merely an order signed by the recorder to the effect that it appearing to him that the offense charged had been committed and that there was sufficient cause to believe petitioner guilty thereof, that petitioner “be held to answer to the same” and committed “to the Marshal of the town of *271Lawndale and that he be admitted to bail on Ms own recognizance” (italic ours). The return further sets forth that petitioner “was arrested as alleged in his petition herein”; but the petition contains no allegation of arrest. It does allege that petitioner “is unlawfully imprisoned, detained, confined and restrained of his liberty” by said mashal, but such allegation amounts to no more than a legal conclusion in view of the allegation immediately following it to the effect that “said imprisonment, detention, confinement and restraint are illegal ... in this, to wit: That on March 23, 1927, said Joe Cavalli as the town marshal . . . swore to a complaint charging petitioner with the crime of misdemeanor ...”
In re Gow, 139 Cal. 242 [73 Pac. 145], holds that when a person accused of violating an ordinance has been allowed to go at large on his own recognizance he will not be permitted to test the legality of his subsequent imprisonment upon a writ of habeas corpus, where it appears that such subsequent restraint was invited and voluntarily submitted to before trial for that purpose only, without any actual imprisonment or restraint, and his nominal imprisonment remains such only so long as it is necessary to file the petition and procure the order for the writ; that in such ease the proceeding upon the writ will be dismissed. In conformity with the rule established in the case above cited, it has been repeatedly held, even in cases where there is actual imprisonment, that if such imprisonment be invited or is voluntarily submitted to for the purpose of testing the validity of a law; or, if after having been admitted to bail the petitioner is surrendered by his bondsmen solely for the purpose of making out a case to support the issuance of a writ of habeas corpus, said writ should be denied (In re Bernson, 35 Cal. App. 344 [169 Pac. 916]; In re Miller, 13 Cal. App. 564 [110 Pac. 139]; Matter of Ford, 160 Cal. 334 [Ann. Cas. 1912D, 1267, 35 L. R. A. (N. S.) 882, 116 Pac. 757]; Ex parte Schmitz, 150 Cal. 663 [89 Pac. 438]).
The attack upon the constitutionality of the ordinance which petitioner is alleged to have violated doubtless presents a number of interesting and serious legal problems, but since it appears from the record before us that the petitioner was not in actual custody or under involuntary *272restraint at the time of the issuance of the writ, and in view of the fact that the law affords him ample remedy, after trial and conviction, to test the validity of the ordinance, we do not feel warranted in deviating from the rule of practice adhered to in the cases above cited; and therefore the writ is discharged and the proceeding dismissed.
Tyler, P. J., and Cashin, J., concurred.