bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] open: introduce O_NOSTD


From: Ulrich Drepper
Subject: Re: [PATCH] open: introduce O_NOSTD
Date: Thu, 27 Aug 2009 07:22:19 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3

On 08/27/2009 06:54 AM, Eric Blake wrote:
I hope that my example shows why doing it in the kernel is desirable -
there is no safe way to keep the pre-O_CLOEXEC efficiency using just the
library, but there IS a way to do it with kernel support:

You're describing a very special case where the performance implications are really minimal and try to argue that is a good enough reason? I don't think so.

If a program really has to do thousands of these safe open calls then it can invest time into opening /dev/null for any of the unallocated descriptors < 3. You can even embed this logic in the safer_open function.

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]