diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2014-10-15 11:28:06 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2014-10-15 11:28:06 +0300 |
commit | 97abef53d67ffb95f566bc0b457a99e51775187b (patch) | |
tree | 3cc3c406c5ca367a4a29f305fbdf93e04d056695 | |
parent | 450740f6d60f5919b421f65b873828761e366e67 (diff) | |
download | smap-97abef53d67ffb95f566bc0b457a99e51775187b.tar.gz smap-97abef53d67ffb95f566bc0b457a99e51775187b.tar.bz2 |
Bugfix.
* src/close-fds.c (close_fds_except): Use FD_SETSIZE instead
of getmaxfd
-rw-r--r-- | src/close-fds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/close-fds.c b/src/close-fds.c index 160017a..9d60fe1 100644 --- a/src/close-fds.c +++ b/src/close-fds.c @@ -30,7 +30,7 @@ close_fds_except(fd_set *exfd) { int i; - for (i = getmaxfd(); i >= 0; i--) + for (i = FD_SETSIZE - 1; i >= 0; i--) if (!FD_ISSET(i, exfd)) close(i); } |