Reputation: 4287
I am trying to monitor if certain application has killed, crashed, force killed on system. How can I get such notifications on Mac.
What is the common approach to implement such design?
Thank you
Upvotes: 3
Views: 1256
Reputation: 22456
I believe the common approach, although probably not exactly what you're looking for, is to periodically poll your processes. For instance:
ps -A | grep 'someIndentifingString'
If this doesn't return anything, your process is gone.
This won't, though, tell you if it was caused by a crash, force kill etc., so I'm not sure that it completely meets your needs.
Upvotes: 0