Re: Re: non-blocking io, EINTR

2008-02-27 Thread jimmy
The author is just trying to make his reads and w rites robust. The functions he has written have no kno= wledge whether or not signals have been set to interrupt system = calls, so he makes sure they test for EINTR in case they have been. On Feb 27, 2008, [EMAIL PROTE

Re: non-blocking io, EINTR

2008-02-27 Thread Mark Linn
On Wed, Feb 27, 2008 at 5:25 AM, James Bailie <[EMAIL PROTECTED]> wrote: > Mark Linn wrote: > > > I am setting the O_NONBLOCK flag on a socket file descriptor using fcntl, > > > > will a read() on the socket return EINTR when the process get a signal? > > By default, read() will restart itse

Re: non-blocking io, EINTR

2008-02-27 Thread James Bailie
Mark Linn wrote: > I am setting the O_NONBLOCK flag on a socket file descriptor using fcntl, > > will a read() on the socket return EINTR when the process get a signal? By default, read() will restart itself automatically, regardless of whether the socket is blocking or not, as long as there is

Re: non-blocking io, EINTR

2008-02-27 Thread Ed Schouten
* Mark Linn <[EMAIL PROTECTED]> wrote: > I am setting the O_NONBLOCK flag on a socket file descriptor using fcntl, > > will a read() on the socket return EINTR when the process get a signal? Probably not, because that would only happen if the kernel would call the *sleep() routines, which it won'

non-blocking io, EINTR

2008-02-27 Thread Mark Linn
Hi, I am setting the O_NONBLOCK flag on a socket file descriptor using fcntl, will a read() on the socket return EINTR when the process get a signal? Thanks Mark ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/fr