Re: Should O_NONBLOCK be copied from listening socket to accepting socket?

From: Herbert Xu (
Date: Thu Sep 07 2000 - 00:57:40 EST

Chris Evans <> wrote:

> Well, in our own manpages

> man 7 socket

> It is possible to do non-blocking IO on sockets by setting
> the O_NONBLOCK flag on a socket file descriptor using
> fcntl(2). O_NONBLOCK is inherited through an accept.

Although accept(2) states the opposite:

       original socket s is unaffected by this call. Note that
       any per file descriptor flags (everything that can be set
       with the F_SETFL fcntl, like non blocking or async state)
       are not inherited across a accept.

Debian GNU/Linux 2.2 is out! ( )
Email:  Herbert Xu ~{PmV>HI~} <>
Home Page:
PGP Key:
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Thu Sep 07 2000 - 21:00:28 EST