tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Detecting parent's termination



Joerg Sonnenberger <joerg%britannica.bec.de@localhost> wrote:

> You can use EVFILT_PROC with NOTE_EXIT for this purpose.

Right, it will not give me a signal, and since I cannot have a thread
for it, I have to use a separate watcher process. It works, except that
the tracked process calls daemon(3), and therefore I see its exit but I
should follow the forked process.

I could track NOTE_FORK as well as NOTE_EXIT, and have a dynamically
sized array of kevent for all child processes, which would get bigged on
NOTE_FORK and smaller on NOTE_EXIT,, but I am certain there is somethign
simplier.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index