[PATCH] [BZ #18433] Check file access/existence before forking.

Joseph Myers joseph@codesourcery.com
Fri Sep 11 19:58:00 GMT 2015


On Sat, 12 Sep 2015, navid Rahimi wrote:

> +  /* Open Read/Write pipe for parent/child communication */
> +  if (__pipe2 (pipefd, O_CLOEXEC))
> +    return errno;

You can't assume that pipe2 is supported unless __ASSUME_PIPE2 is defined.  
It might be an ENOSYS stub, or it might be unsupported at runtime because 
the kernel isn't recent enough.  In either case, an ENOSYS error from 
pipe2 must not result in such an error from posix_spawn.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list