Subject: Re: [PATCH] paccept, socket, socketpair w/flags

From: Ulrich Drepper <[email-masked]>
Date: Mon, 28 Apr 2008 07:13:31 -0700

Michael Kerrisk wrote:
> This is ugly.  Why invent a diffent set of flags here.  I agree with
> your earlier statement that new syscalls would be cleaner.

Don't lay words in my mouth.  I do think that different flags are
needed.  The name of the flag must indicate what it is for and you don't
want to mix flags with different prefixes for the same flags parameter.
 Not introducing separate flags would mean all the functions would have
to accept the same set of flags which will sooner or later create
problems.  I really don't see the problem here.

> then *please* let's go the hwole way cleanly, and have new syscalls
> also for socketpair() and socket(), and make all of the new syscalls
> use the same flags.

Hell, no, that's worse than everything else proposed.  We don't have the
luxury to have a separate parameter to indicate close-on-exec or not.
For efficiency it has to be a multi-purpose flags parameter and the
flags each syscall takes are different since the functionality is different.

- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖