Stefan Esser wrote:

>Instead of the for loop, I'd rather have:
>
>  while(waitpid(pid, NULL, WNOHANG) == EINTR)
>
This should be

while (waitpid(pid, NULL, WNOHANG) < 0 && errno == EINTR)

>
>    /* do nothing */;
>
>  return kill(pid, 0) == 0;
>
-- 
John Rochester              Software Architect, Merus Software Ltd.
Tel: +44 7870 174690        http://merus.co.uk



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

Reply via email to