On 08/18/17 09:46 AM, Paul Pluzhnikov wrote: > On Fri, Aug 18, 2017 at 8:16 AM, Dave Watson <davejwat...@fb.com> wrote: > > > and also handle EINTR > > > + int bytes = read (validate_pipe[0], &buf, 1); > > + if (bytes >= 0 || errno == EAGAIN || errno == EWOULDBLOCK) > > On Linux: > > #define EWOULDBLOCK EAGAIN /* Operation would block */ > > Did you mean errno == EINTR above?
No, EINTR should retry again in the loop. I just went by the manpage that claims EAGAIN or EWOULDBLOCK The file descriptor fd refers to a socket and has been marked nonblocking (O_NONBLOCK), and the read would block. POSIX.1-2001 allows either error to be returned for this case, and does not require these constants to have the same value, so a portable application should check for both possibilities. _______________________________________________ Libunwind-devel mailing list Libunwind-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/libunwind-devel