Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NSNotification to detect other program's crashes

I was planning on writing a small daemon that detected whether another app crashed, thinking all the while that the system would send an NSWorkspaceDidTerminateApplicationNotification, but this is not the case.

Assuming that I do not want to create a launchd process to simply re-launch the crashed application, can I detect the crash any other way?

Perhaps I could monitor the system log? That seems unduly burdensome.

like image 396
Andrew J. Freyer Avatar asked Nov 05 '22 08:11

Andrew J. Freyer


2 Answers

How about watching for if/when the /usr/sbin/spindump process starts up?

like image 111
Dave DeLong Avatar answered Nov 09 '22 14:11

Dave DeLong


Turns out what worked best as a crash monitor was reading the FSEventStream for Crash Logs.

like image 21
Andrew J. Freyer Avatar answered Nov 09 '22 13:11

Andrew J. Freyer