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

From: Ulrich Drepper
Date: Mon Apr 28 2008 - 10:14:03 EST


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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 â
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFIFduL2ijCOnn/RHQRAhV5AKDK924ANx9HO5qDbPyB6m4uegbABACgpkFA
AOO7/HaCFNe/GNmNlEJXBag=
=18Bc
-----END PGP SIGNATURE-----
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/