Finding out when a process has died
Hi, I want to write a process (hopefully userspace) which will "watch" other processes and do something when a process dies. What is a good way to do this? A simple solution would be to have a stream/tcp connection between the watcher and other processes and when the connection is broken, you know the other side has died. Is there a better way to do this possibly involving a kernel mod? Thanks!!
On Tue, Oct 11, 2011 at 8:57 AM, MK <stardust496@gmail.com> wrote:
Hi,
I want to write a process (hopefully userspace) which will "watch" other processes and do something when a process dies. What is a good way to do this? A simple solution would be to have a stream/tcp connection between the watcher and other processes and when the connection is broken, you know the other side has died. Is there a better way to do this possibly involving a kernel mod?
Thanks!!
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Hi, I think you can make use of user-defined signal handlers. Regards, Rohan Puri
On Oct 10, 2011, at 9:27 PM, MK wrote:
Hi,
I want to write a process (hopefully userspace) which will "watch" other processes and do something when a process dies. What is a good way to do this? A simple solution would be to have a stream/tcp connection between the watcher and other processes and when the connection is broken, you know the other side has died. Is there a better way to do this possibly involving a kernel mod?
Thanks!!
Check out http://mmonit.com/monit/ It has a lot of nice features and is turnkey if you don't want to 'roll your own' -Bruce
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
participants (3)
-
Bruce Rowen -
MK -
rohan puri