lynx-dev
[Top][All Lists]
Advanced

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

Re: LYNX-DEV Compilation error


From: John E. Davis
Subject: Re: LYNX-DEV Compilation error
Date: Fri, 12 Sep 1997 08:52:17 -0400

>>#if HAVE_TYPE_UNION_WAIT && !HAVE_WAITPID
>>            while (wait(&wstatus) != pid)
>>                ; /* do nothing */
>>#else
>>            waitpid(pid, &wstatus, 0); /* wait for child */
>>#endif
>>            if (WEXITSTATUS(wstatus) != 0 ||
>>                WTERMSIG(wstatus) > 0)  { /* error return */

Please be sure to check the return value on these system calls.  That
is, recode the waitpid fragment as:

   while (-1 == waitpid (pid, &wstatus, 0))
     {
#ifdef EINTR
        if (errno == EINTR) continue;
#endif
#ifdef ERESTARTSYS
        if (errno == ERESTARTSYS) continue;
#endif
        break;
     }

--John
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]