[PATCH] Assume that pipe2 is always available

Florian Weimer fweimer@redhat.com
Thu Apr 13 18:18:00 GMT 2017


I have looked at the NaCl port.

It does not support fork or the exec* family of functions.  This means 
that the O_CLOEXEC flag is quite meaningless.  O_NONBLOCK is still 
useful.  The races can largely be obscured due to the lack of fork 
support.  The exception is dup3, where the new descriptor will 
temporarily lack the O_CLOEXEC flag, and this flag is actually 
observable by a racing thread (because the descriptor is specified by 
the caller).  But this looks like a minor issue.

In any case, I think it is possible to implement a reasonable emulation 
of pipe2 and dup3 in glibc for NaCl (unlike Linux, where kernel support 
would be needed).  So I would like to proceed with these cleanups even 
if we decide not to remove the NaCl port.

Thanks,
Florian



More information about the Libc-alpha mailing list