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

Re: [leafnode-list] SIGCHLD, read EOF, and checking EINTR



Jeffrey Goldberg schrieb am Dienstag, den 05. Februar 2002:

> > and I could also imagine setting SIGCHLD to ignore to let the kernel
> > reap nntpd's children automatically without wait. After all, nntpd does
> > not really need to fork at all.
> 
> Even if you can eliminate all the forks, it still makes sense to check for
> errno == EINTR on EOF in getline, since that guards against future
> additions of code that cause signals to be sent. It's just checking for
> normal error conditions. Generally good practice.

True, but then getline may not be the only place to fix, just a starting
point, I'll have to go figure first.

> I'm wondering if on some systems kill(pid, 0) (from lockfile.c) is not
> behaving as documented.  Again, the patch I provided would protect against
> such buggy systems.

True. I might write a test that's run to make sure we don't blast
ourselves away, but I don't currently know of a better way to figure if
a PID exists.

-- 
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list