It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Whoever has three children die, the Fire will touch him only to fulfil the oath."
Abu Ubayd said: "Tahillat al-qasam" (fulfilling the oath) refers to the saying of Allah: "And there is none of you except he will pass over it; that is upon your Lord a decree that must be fulfilled." [Surah Maryam: 71] He said: He will be made to pass over Hell only for the sake of fulfilling the oath. If a person swears that he will do such-and-such, but then does part of it and not the rest, his oath is fulfilled.
The Shaykh said: (That is,) he does that to which the name truly applies.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأيمان / 20032