tech-userlevel archive

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

Re: Detecting parent's termination



In article <1ken6r4.125szu9egpa5rM%manu%netbsd.org@localhost>,
Emmanuel Dreyfus <manu%netbsd.org@localhost> wrote:
>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.

It would be easy to set the kqueue fd to deliver SIGIO when it gets a new
event, if it does not do it right now.

christos



Home | Main Index | Thread Index | Old Index