tech-userlevel archive

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

Re: Detecting parent's termination

Joerg Sonnenberger <> 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

Emmanuel Dreyfus

Home | Main Index | Thread Index | Old Index