He used to report from the Prophet ﷺ that the sun and the moon do not eclipse for the death of anyone or for his life, but they are two signs among the signs of Allah, so when you see them, pray.
أنه كان يخبر عن النبي ﷺ: إن الشمس والقمر لا يخسفان لموت أحد ولا لحياته، ولكنهما آيتان من آيات الله، فإذا رأيتموهما فصلوا.
Bukhari narrated it in the Book of Eclipse (1042), and Muslim in the Book of Eclipse (914), both through Ibn Wahb, who said, Amr bin Harith informed me that Abdul-Rahman bin Qasim narrated to him from his father Qasim bin Muhammad bin Abu Bakr Siddiq, from Abdullah bin Umar, and he related the hadith. Their wordings are identical.