[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A97D471.5030100@byu.net>
Date: Fri, 28 Aug 2009 06:58:25 -0600
From: Eric Blake <ebb9@....net>
To: Florian Weimer <fweimer@....de>
CC: Davide Libenzi <davidel@...ilserver.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
bug-coreutils@....org, bug-gnulib@....org,
Ulrich Drepper <drepper@...hat.com>,
Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH] open: introduce O_NOSTD
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Florian Weimer on 8/28/2009 6:52 AM:
>> If the caller requested O_CLOEXEC, then your version takes 3, 5, or
>> 7 syscalls depending on how many std fds were closed, while my
>> version takes 3 syscalls regardless of how many std fds were closed.
>
> I really don't see a way around that. You can't pick a descriptor and
> hope that it's unused.
fcntl(,F_DUPFD,3) is NOT like dup2. It picks the next available
descriptor that is at least 3.
- --
Don't work too hard, make some time for fun as well!
Eric Blake ebb9@....net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkqX1HEACgkQ84KuGfSFAYAzYQCgnwad5k39bZJqw3Wg1vMED/Fd
zjYAmwenJlImBUE33geRdHC6aoVSx7JG
=omNI
-----END PGP SIGNATURE-----
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists