I have read on a offical islamic fatwa site that parents who kill their child cannot be killed in retaliation for this, but the hadiths are all daif.
http://www.islamweb.net/emainpage/index.php?page=showfatwa&Option=FatwaId&lang=E&Id=138307
http://www.islamweb.net/emainpage/index.php?page=showfatwa&Option=FatwaId&Id=200403
And in the classic manual of Islamic law, Umdat as-Salik wa ‘Uddat an-Nasik, we read:
Qisas is obligatory on whoever kills a person purely intentionally and aggressively (that is, not in self-defense). But qisas is not applicable on children or the insane under any circumstances, nor is it applicable on a Muslim for killing a kafir, nor on a free man for killing a slave, nor on a dhimmi for killing an apostate, nor on a father or a mother (or their fathers or mothers) for killing their child, or their child’s children.
Narrated Suraqah bin Malik bin [Ju'shum]: "The Messenger of Allah (ﷺ) judged that the son is to suffer retaliation for [killing] his father, but the father is not to suffer retaliation for [killing] his son."
Grade : Da'if (Darussalam)
Reference : Jami` at-Tirmidhi 1399
In-book reference : Book 16, Hadith 15
English translation : Vol. 1, Book 14, Hadith 1399
It was narrated from Ibn 'Abbas that the Messenger of Allah (ﷺ) said: “A father should not be killed for his son.”
Grade : Da'if (Darussalam)
English reference : Vol. 3, Book 21, Hadith 2661
Arabic reference : Book 21, Hadith 2763
Narrated Ibn 'Abbas: that the Prophet (ﷺ) said: 'The Hudud are not carried in the Masjid, and the father is not killed for the son."
Grade : Da'if (Darussalam)
Reference : Jami` at-Tirmidhi 1401
In-book reference : Book 16, Hadith 17
English translation : Vol. 3, Book 14, Hadith 1401
But these hadiths (although numerous) are all weak so why do they abide by this ruling? Is a mistake, please clarify the matter?