On Tue, Sep 8, 2015 at 9:51 AM, FX <fxcoud...@gmail.com> wrote: >> #define _FCLOEXEC 0x0000001000000000L >> #define O_CLOEXEC _FCLOEXEC /* sets FD_CLOEXEC on open */ > > That’s weird, and definitely an AIX bug: > http://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html
Welcome to AIX :-/ > How does that even work? open() takes int as second arg. No one else uses it? ;-) The following kluge works: Index: posix.c =================================================================== --- posix.c (revision 227528) +++ posix.c (working copy) @@ -45,6 +45,10 @@ #define O_BINARY 0 #endif +#ifdef _AIX +#undef O_CLOEXEC +#endif + #ifndef O_CLOEXEC #define O_CLOEXEC 0 #endif Thanks, David