On Mon, Feb 1, 2010 at 8:54 AM, Kyle McMartin <kyle@xxxxxxxxxxx> wrote: > ping? Thanks for the ping. > On Sat, Dec 26, 2009 at 01:20:50PM -0500, Kyle McMartin wrote: >> So I wired up sys_accept4 over lunch today... it works ok in general, >> and takes arguments such that it doesn't need a wrapper (yay.) >> >> Problem. O_CLOEXEC is special on parisc because of the HPUX gunk which >> makes everything miserable. The value in glibc is one bit off the value >> in the kernel, and kaboom. No worky syscall. >> >> Carlos, patch included below, tested with test_accept4.c, from Ulrich's >> commit adding this syscall, modified (fixed) version of the test case >> is attached to this email unless I'm a muppet and forgot. >> >> Happy hacking^WHolidays, Kyle >> >> diff --git a/ChangeLog.hppa b/ChangeLog.hppa >> index 24a152e..4ce4cc7 100644 >> --- a/ChangeLog.hppa >> +++ b/ChangeLog.hppa >> @@ -1,3 +1,7 @@ >> +2009-12-26 Kyle McMartin <kyle@xxxxxxxxxx> >> + * sysdeps/unix/sysv/linux/hppa/bits/socket.h: Fix value of >> + SOCK_CLOEXEC to match O_CLOEXEC. >> + >> 2009-11-25 Carlos O'Donell <carlos@xxxxxxxxxxxxxxxx> >> >> * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h: >> diff --git a/sysdeps/unix/sysv/linux/hppa/bits/socket.h b/sysdeps/unix/sysv/linux/hppa/bits/socket.h >> index ac6e81b..d552d85 100644 >> --- a/sysdeps/unix/sysv/linux/hppa/bits/socket.h >> +++ b/sysdeps/unix/sysv/linux/hppa/bits/socket.h >> @@ -62,7 +62,7 @@ enum __socket_type >> /* Flags to be ORed into the type parameter of socket and socketpair and >> used for the flags parameter of paccept. */ >> >> - SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the >> + SOCK_CLOEXEC = 01000000, /* Atomically set close-on-exec flag for the >> new descriptor(s). */ >> #define SOCK_CLOEXEC SOCK_CLOEXEC >> #undef SOCK_NONBLOCK IIUC SOCK_CLOEXEC only works in 2.6.27 or higher with accept4? In which case, since accept4 has never existed before, it's OK to change this value? Cheers, Carlos. -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html