1. A learned single Judge of this Court has referred the following question for decision by a bench :
'Can an order under S. 8 (1) (a), U. P. Act IV  of 1947, be validly passed against a person, who is already in person (otherwise than under an order Under Section 3(2) of the Act) and who was not arrested with a view to ordering his detention under the Act ?' The whole case has been, however, put up before this Bench for decision under the orders of the Chief Justice, as the learned single Judge has gone out of station during the vacation.
2. Mr. S.N. Dwivedi has appeared on be-half of the applicant and from the facts given by him appears that the applicant has been in lawful custody at least from 15th December 1948. The applicant was arrested on 19th November 1948, for breach of an order passed Under Section 144, Criminal P. C. He was granted bail but on 15th December 1948, he was re-arrested for breach of an order passed Under Section 8(l) (f), U. P. Maintenance of Public Order (Temporary) Act (IV  of 1947). It appears that by an order passed in October, 1948, he was directed not to take part in certain activities and was required to execute a personal bond in a sum of Rs. 1,000/- and two sureties for Rs. 600/- each. The applicant failed to carry out this order and a case was thereafter started against him for breach of the said order and from 15th December, 1948, he was in custody as an under-trial prisoner. On 7th January 1949, the applicant was convicted Under Section 188, Penal Code for breach of the order Under Section 144, Crinrnal P. C., and was sentenced to one month's rigorous imprisonment. So with effect from 7th January 1949, the applicant was undergoing the sentence of one month. This sentence expired on 7th February 1949, but he was detained in custody as an under-trial prisoner in the case Under Section 3, Sub-section (7), U. P. Maintenance of Public Order (Temporary) Act. He did not apply for bail and on 25th April 1949, he was sentenced to six months' rigorous imprisonment and is now undergoing that sentence. It would appear from the above narrative of facts that the applicant has been in custody as an under-trial prisoner and has been undergoing the sentence passed by a Court in accordance with law from 16th December 1948. There can, therefore, be no question of any unlawful detention, nor can an application by the applicant for a writ of habeas corpus for his production on the ground that he has been illegally detained be entertained.
3. Learned counsel has informed us that on 7th March 1949, an order was passed by the Provincial Government Under Section 3 (l) (a), U. P. Maintenance of Public Order (Temporary) Act (IV  of 1947) directing his detention for a period of six months. It is the legality of that order that the applicant is questioning by his application Under Section 491, Criminal P. C. The mere fact that an illegal order, assuming that the order passed was illegal, had been passed against a prisoner, does not give him a right to apply for a writ of habeas corpus unless he had been taken in custody or his movements had been restricted by reason of that order. A writ of habeas corpus can only be asked for on the ground that a person has been kept under illegal detention. If there is no illegal detention there is no right Under Section 491, Criminal P. C., to move this Court for determination of the question whether a particular order is valid or invalid.
4. The application, to our minds, at this stage is misconceived and has, therefore, no force. We, therefore, dismiss it.