Hi! It looks like mingw adds more and more POSIX functions to the crt. For example, gettimeofday() is now misc/gettimeofday.c, etc.
Thus, what about pipe()? I noticed that in the "compat" part of a program of mine the only piece still used is: #ifndef HAVE_PIPE int pipe(int p[2]) { if (!CreatePipe((PHANDLE)p, (PHANDLE)p+1, 0, 0)) return -1; p[0]=_open_osfhandle(p[0],0); p[1]=_open_osfhandle(p[1],0); return 0; } #endif The semantics of _open_osfhandle() are what we want -- those HANDLEs go away when the file descriptors get close()d. I don't think CreatePipe() sets errno, but translating GetLastError() shouldn't be rocket surgery. I'm not providing a proper patch yet, as I'd need to learn your build system -- thus asking first. Meow! -- ⢀⣴⠾⠻⢶⣦⠀ 10 people enter a bar: ⣾⠁⢰⠒⠀⣿⡁ • 1 who understands binary, ⢿⡄⠘⠷⠚⠋⠀ • 1 who doesn't, ⠈⠳⣄⠀⠀⠀⠀ • and E who prefer to write it as hex. _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public