It is narrated from Yazid bin Hurmuz (may Allah have mercy on him) that he said: I myself wrote the letter of Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) to Najdah, in which he wrote in reply: "You asked me about killing children, and (argued) that the scholar of Musa (peace be upon him) (al-Khidr) killed a boy; yet the Messenger of Allah (peace and blessings be upon him) forbade the killing of children. So if you come to know about children what the scholar of Musa (peace be upon him) knew, then do it (otherwise it is not permissible). And you wrote asking whether women used to take part in battle with the Messenger of Allah (peace and blessings be upon him), whether they were given something from the spoils, and whether they had a fixed share. They did take part in battle with the Messenger of Allah (peace and blessings be upon him), and they were given something (from the spoils, as a gift), but no fixed share was allotted to them." Isma'il (the narrator) added in the hadith: "And you asked me about slaves: did they take part in battle with the Messenger of Allah (peace and blessings be upon him), and did they have a fixed share? So he wrote to him about the slaves just as he had written about the women. And you asked me about the orphan: when does he come out of orphanhood? When he reaches puberty he comes out of orphanhood, and (if they take part in battle) a share is allotted to them."
Hadith Referenceمسند أبي يعلى الموصلي / أول مسند ابن عباس / 2631