in several matters. 11. This Court in the case of Tejaswini Gaud and others (supra) after considering the earlier cases, observed thus: “19. Habeas corpus proceedings is not to justify or examine the legality of the custody. Habeas corpus proceedings is a medium through which the custody of the child is addressed to the discretion of the Court. Habeas corpus is a prerogative writ which is an extraordinary remedy and the writ is issued where in the circumstances of the particular case, ordinary remedy provided by the law is either not available or is ineffective; otherwise a writ will not be issued. In child custody matters, the power of the High Court in granting the writ is qualified only in cases where the detention of a minor by a person who is not entitled to his legal custody. In view of the pronouncement on the issue in question by the Supreme Court and the High Courts, in our view, in child custody matters, the writ of habeas corpus is maintainable where it is proved that the