On Thu, Aug 27, 2009 at 15:55, Davide Libenzi wrote:
> Can't the handling be done on close(), like (modulo some errno save/restore):
No. You can have any file descriptor closed when the process is
started. No close in the process with the special close.
On Thu, 27 Aug 2009, Eric Blake wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> According to Davide Libenzi on 8/25/2009 3:53 PM:
> >> Another solution is for the application to sanitize all newly-created
> >> fds: GNU coreutils provides a wrapper open_safer, which does nothing
> >>
Alan Hourihane ha escrit:
> As the subject line says, and I end up with an unresolved symbol.
Please try this patch:
diff --git a/lib/exclude.c b/lib/exclude.c
index 32f2a0a..00f3891 100644
--- a/lib/exclude.c
+++ b/lib/exclude.c
@@ -31,6 +31,7 @@
#include
#include
#include
+#include
Bruno Haible writes:
> Hi,
>
> On Solaris/x86, with SunPRO C 5.9, the test-bitrotate fails:
>
> test-bitrotate.c:227: assertion failed
> FAIL: test-bitrotate
>
> The reason is that test-bitrotate.c:227 passes a 0 shift count to rotr64,
> which is outside the specification of rotr64.
>
> I pro
Bruno Haible writes:
> On Solaris/x86, with SunPRO C 5.9, the test-func test fails. The reason
> is that
> sizeof __func__
> evaluates to 0. The compiler warns about it:
> "test-func.c", line 40: warning: null dimension: sizeof()
>
> What to do? m4/func.m4 could defined __func__ to a dummy.
* Eric Blake:
> int open_safer (const char *name, int flags, int mode)
> {
> int fd = open (name, flags | O_CLOEXEC, mode);
> if (0 <= fd && fd <= 2)
> {
> int dup = fcntl (fd, ((flags & O_CLOEXEC)
> ? F_DUPFD_CLOEXEC : F_DUPFD), 3);
> int saved_errn
As the subject line says, and I end up with an unresolved symbol.
Not sure what the right definition check to wrap that up in though.
Thanks,
Alan.
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 per
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Davide Libenzi on 8/25/2009 3:53 PM:
>> Another solution is for the application to sanitize all newly-created
>> fds: GNU coreutils provides a wrapper open_safer, which does nothing
>> extra in the common case that open() returned 3 or lar
Hi,
On Solaris/x86, with SunPRO C 5.9, the test-bitrotate fails:
test-bitrotate.c:227: assertion failed
FAIL: test-bitrotate
The reason is that test-bitrotate.c:227 passes a 0 shift count to rotr64,
which is outside the specification of rotr64.
I propose to remove that particular test:
20
On Solaris/x86, with SunPRO C 5.9, the test-func test fails. The reason
is that
sizeof __func__
evaluates to 0. The compiler warns about it:
"test-func.c", line 40: warning: null dimension: sizeof()
What to do? m4/func.m4 could defined __func__ to a dummy. But that's too
much damage IMO. Bett
11 matches
Mail list logo