Re: [PATCHv5 4/5] Allow setting O_NONBLOCK flag for new sockets

Ulrich Drepper
2007-11-24T16:11:49Z

On Nov 24, 2007 12:28 AM, Eric Dumazet <dada1@cosmosbay.com> wrote:
> OK, but maybe for consistency, we might accept the two mechanisms.

It's not a question of the kernel interface. The issue with all these
extensions is the userlevel interface. Ideally no new userlevel
interface is needed. This is the case for open() and incidentally
also for this case (through the flags parameter for recvmsg). For
socket(), accept(), the situation is unfortunately different and we
need a new interface.

With your proposed patch, we would have to introduce another recvmsg()
interface to take advantage of the additional functionality. This
just doesn't make any sense. This is no contest in aesthetics. You
first have to think about the interface presented to the programmer at
userlevel and then design the syscall interface. This is how
MSG_CMSG_CLOEXEC came about.