fix special-case breakage in popen due to reversed argument order
This commit is contained in:
parent
c2d3fd3aad
commit
fe80a8eb68
1 changed files with 1 additions and 1 deletions
|
|
@ -39,7 +39,7 @@ FILE *popen(const char *cmd, const char *mode)
|
||||||
* remove the close-on-exec flag in the child without also creating
|
* remove the close-on-exec flag in the child without also creating
|
||||||
* a file descriptor leak race condition in the parent. */
|
* a file descriptor leak race condition in the parent. */
|
||||||
if (p[1-op] == 1-op) {
|
if (p[1-op] == 1-op) {
|
||||||
int tmp = fcntl(F_DUPFD_CLOEXEC, 1-op, 0);
|
int tmp = fcntl(1-op, F_DUPFD_CLOEXEC, 0);
|
||||||
if (tmp < 0) {
|
if (tmp < 0) {
|
||||||
e = errno;
|
e = errno;
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue