> 'Alfred Perlstein' wrote:
> 
>> int
>> sigchld_handler(int) 
>> {
>> 
>>      while (waitpid(-1, NULL, 0) || errno == EINTR)
>>              ;
>> }

actually, shouldn't you use WNOHANG when calling waitpid() there?  What
I normally do is

        int e = errno;

        while (waitpid(-1, NULL, WNOHANG) > 0)
                ;

        errno = e;

But I think I'm drifting from the original point.

-- 
Ben Smithurst / [EMAIL PROTECTED] / PGP: 0x99392F7D


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to