tech-userlevel archive

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

Re: Detecting parent's termination



Emmanuel Dreyfus <manu%netbsd.org@localhost> wrote:

> > You can use EVFILT_PROC with NOTE_EXIT for this purpose.
> Is there any way to get a signal delivered? That happens in perfused,
> which i linked with libpuffs, which IIRC is not thread-safe.

I discovered a possible easier way: perfused shares a socketpair with
the parent (that is, the filesystem), and it uses send/recv to talk with
it. I just noticed I used MSG_NOSIGNAL here. As I understand, if I
remove MSG_NOSIGNAL, I should get a SIGPIPE when parent dies. 

Unfortunately I do not get any signal. I understand that is wrong, and I
suspect it may be a SOCK_SEQPACKET bug.

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


Home | Main Index | Thread Index | Old Index