Rava teaches that if someone kills a tereifa – someone with a physical defect that is so severe that we know he will die within a relatively short time – he will not be considered a murderer, since the dead man was essentially considered to be dead already.
The concept of a tereifa appears in the Torah in the context of an animal that has been attacked and killed (see Shemot 22:30) that cannot be eaten. In the Talmud – and in common language today – the concept has been broadened beyond an animal that is attacked by a predator to include any animal that has a physical defect severe enough to hasten its death. The term should be understood similarly when used in reference to a human being – a person who has a serious physical condition that we know will lead to his death within a specific time frame – a year or less. In the case discussed in our Gemara it appears that we are talking about a situation where the condition that makes the man a tereifa is obvious and apparent, since we do not assume that any given person has a condition that would make him a tereifa.
Although Rava states that no one disagrees with his ruling on this matter, Rav Yaakov Emden points out that we find a story in Tanakh where it appears that someone is killed for murdering a dying man. In the first chapter of I Shmuel we find that King David executes a na’ar (youth) Amaleki when he discovers that he killed King Sha’ul. From the descriptions in the navi it seems clear that King Sha’ul’s physical condition was such that he would have been considered a tereifa. It may be, however, that King David did not execute him as a murderer, rather because of King Sha’ul’s high standing, the na’ar Amaleki deserved death for killing the king.