diff options
Diffstat (limited to 'lib/libc/gen')
-rw-r--r-- | lib/libc/gen/popen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/popen.c b/lib/libc/gen/popen.c index 4f94405c2ff4..c5373077f3ae 100644 --- a/lib/libc/gen/popen.c +++ b/lib/libc/gen/popen.c @@ -181,7 +181,7 @@ popen(const char *command, const char *type) * the list which will cause an explicit close. */ if (!cloexec) - (void)_fcntl(*type == 'r' ? pdes[0] : pdes[1], F_SETFD, 0); + (void)_fcntl(fileno(iop), F_SETFD, 0); return (iop); } |