Hello, I am looking for a kernel mechanism whereby a user process could receive a notification, via a signal or blocking syscall whenever another thread or process terminates. I am interested in such a mechanism in a situation where the terminating thread or process is NOT a descendant of the notifiee. Otherwise, I could simply use SIGCHLD.
Today, the solution is to ptrace that thread until it dies. But this is overkill as we have to deal with signal forwarding and such. I am wondering: - does utrace offer this kind of notification directly? - if not, can this be built on top? I am interested in this in the context of perfmon. You can attach to another process to monitor it for a while or until it dies. It is nice to avoid maintaining the monitored thread under ptrace during the session. Today, perfmon uses its own notification mechanism via a message queue to forward the information to use monitoring tool. I'd rather use a standard kernel mechanism rather than this. Thanks. -- -Stephane