This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/18433] posix_spawn does not return correctly upon failure to execute
- From: "rahimi.nv at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sat, 12 Sep 2015 20:56:41 +0000
- Subject: [Bug libc/18433] posix_spawn does not return correctly upon failure to execute
- Auto-submitted: auto-generated
- References: <bug-18433-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18433
--- Comment #4 from navid R <rahimi.nv at gmail dot com> ---
I developed a pipe solution but didn't get accepted . the problem raise because
glibc is supporting system without pipe2 , (we can use pipe for creating file
descriptor and use fcntl and FD_CLOEXEC to set it proper flag , but there is
race condition between two calls . and the overall code is so messy .
#ifdef __ASSUME_PIPE2
if (__pipe2 (pipefd, O_CLOEXEC))
return errno;
#else
if (__pipe (pipefd))
return errno;
if (__fcntl (pipefd[0], FD_CLOEXEC) == -1 ||
__fcntl (pipefd[1], FD_CLOEXEC) == -1
return errno;
--
You are receiving this mail because:
You are on the CC list for the bug.