-691(b) Written consent to the adoption is required, as provided by section 381 of this title, except that if the custody of the child has been awarded to the petitioner's spouse, the consent of the other parent is not required. § 383. Notice to absent or nonconsenting parent In cases of adoption where the consent of a parent is required, and it is alleged in the petition that the parent refuses to sign the consent, or is a resident of the Republic of Panama or elsewhere, an order to the parent to show cause why the petition should not be granted may be entered by the court. The order shall be published in accordance with section 163 of Title 5. § 384. Investigation Upon the filing of a petition for adoption, the court may order an investigation to be made by a representative designated by the court and may further order that a report of the investigation shall be filed with the court within the time fixed in the order. The investigation may include the conditions and antecedents of the child for the purpose of determining whether he is a proper subject for adoption; appropriate inquiry to determine whether the proposed home is a suitable one for the child; and any other circumstances and conditions which may have a bearing on the adoption and of which the court should have knowledge. The report of the investigation shall become a part of the files in the case, and the court may require that the report contain a definite recommendation for or against the adoption and state reasons therefor. § 385. Adoption order; effect (a) When this chapter is complied with, if the court is satisfied with the ability of the petitioner to bring up and educate the child properly, having reference to the degree and condition of the child's parents and the fitness and propriety of the adoption, it shall make an order setting forth the facts and declaring that from that date the child, to all legal intents and purposes, is the child of the petitioner and that its name is thereby changed. The order shall be recorded in the records of the court. (b) The natural parents, except the spouse of the petitioner when a child is adopted pursuant to section 382 of this title, shall, by the order referred to in subsection (a) of this section, be divested of all legal rights and obligations in respect to the child, and the child shall be free from all legal obligations of obedience and maintenance with respect to them. The child shall be to all intents and purposes the child and legal heir of the person adopting him or her, entitled to all the rights and privileges, and subject to all the obligations of a child of such person begotten in lawful wedlock. § 386. Consent to adoption of illegitimate child If the child to be adopted is illegitimate, the consent of the father to adoption is not required. § 387. Adoption of illegitimate child by father The father of an illegitimate child, by publicly acknowledging it as his own, receiving it as his own, with the consent of his wife, if he is married, into his family, and otherwise treating it as if it were a legitimate child, thereby adopts it as a legitimate child; and the child is thereupon deemed for all purposes legitimate from the time of its birth. Sections 381-386 of this title do not apply to such an adoption.