| To: | "David S. Miller" <davem@xxxxxxxxxx> |
|---|---|
| Subject: | Re: No Bug: accept discards socket options/O_NONBLOCK |
| From: | Matthias Andree <matthias.andree@xxxxxxxxxxxxxxxxxxxx> |
| Date: | Fri, 15 Sep 2000 15:57:32 +0200 |
| Cc: | linux-kernel@xxxxxxxxxxxxxxx, dns@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx |
| In-reply-to: | <200009151254.FAA09729@xxxxxxxxxxxxxxx>; from davem@xxxxxxxxxx on Fri, Sep 15, 2000 at 05:54:14 -0700 |
| Mail-followup-to: | "David S. Miller" <davem@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, dns@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx |
| References: | <20000915150125.A8057@xxxxxxxxxxxxxxxxxxx> <200009151254.FAA09729@xxxxxxxxxxxxxxx> |
| Sender: | owner-netdev@xxxxxxxxxxx |
| User-agent: | Mutt/1.2.5i |
On Fri, 15 Sep 2000, David S. Miller wrote: [accept not inheriting O_NONBLOCK] > The socket(7) manpage is buggy, not the kernel. > > This has been this way forever, it is thus an API and it is not > changing. Changing it would break existing programs. End of story. I have been looking through the Single Unix Specification v7 and various accept(2) man pages (NetBSD 1.3, SunOS 4.1.3, SunOS 5.7) and all go like this: "creates a new socket with the same properties as s." "creates a new file descriptor." - no mention if that has the same O_ flags as the listening socket. So it seems that BSD and Solaris 7 happen to copy the fd options as well, and Linux happens to just create a new fd, and both are right. Now, interpreting properties as "socket properties", and O_NONBLOCK being a file descriptor property, it may be legal to not copy the fd flags. However, this makes Linux incompatible with *BSD and Solaris, so I'm wondering what this "break existing programs" would be, portable programs would most likely not break by the API change. Break portability, that's what it actually does, regardless of who is correct. *sigh* -- Matthias Andree |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [2.4][2.2] Bug: accept discards socket options/O_NONBLOCK, \"Theodore Y. Ts'o\" <tytso@xxxxxxx> To: Matthias Andree |
|---|---|
| Next by Date: | Re: No Bug: accept discards socket options/O_NONBLOCK, David S. Miller |
| Previous by Thread: | Re: [2.4][2.2] Bug: accept discards socket options/O_NONBLOCK, Andi Kleen |
| Next by Thread: | Re: No Bug: accept discards socket options/O_NONBLOCK, David S. Miller |
| Indexes: | [Date] [Thread] [Top] [All Lists] |