![]() ![]() | ![]() |
version 1.1.1.2, 2013/07/22 10:46:11 | version 1.1.1.3, 2013/10/14 07:56:33 |
---|---|
Line 83 closefrom_fallback(int lowfd) | Line 83 closefrom_fallback(int lowfd) |
if (maxfd < 0) | if (maxfd < 0) |
maxfd = OPEN_MAX; | maxfd = OPEN_MAX; |
for (fd = lowfd; fd < maxfd; fd++) | for (fd = lowfd; fd < maxfd; fd++) { |
#ifdef __APPLE__ | |
/* Avoid potential crash with libdispatch when we close its fds. */ | |
(void) fcntl(fd, F_SETFD, FD_CLOEXEC); | |
#else | |
(void) close((int) fd); | (void) close((int) fd); |
#endif | |
} | |
} | } |
/* | /* |