X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2Fpopen.c;h=92cb57ee937b7ea3908de2c0de86ced5eefb3d8d;hb=2a0bb9e0f2d87d2bcad746ffad96fb3355f1de6e;hp=28ff23fd1614422bdbeb907529b08c7ec5c6b413;hpb=9cb6e6ea120cfaf1df9016883012d22fb57d43e1;p=musl diff --git a/src/stdio/popen.c b/src/stdio/popen.c index 28ff23fd..92cb57ee 100644 --- a/src/stdio/popen.c +++ b/src/stdio/popen.c @@ -39,7 +39,7 @@ FILE *popen(const char *cmd, const char *mode) * remove the close-on-exec flag in the child without also creating * a file descriptor leak race condition in the parent. */ 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) { e = errno; goto fail;