summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2014-10-15 08:28:06 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2014-10-15 08:28:06 (GMT)
commit97abef53d67ffb95f566bc0b457a99e51775187b (patch) (side-by-side diff)
tree3cc3c406c5ca367a4a29f305fbdf93e04d056695
parent450740f6d60f5919b421f65b873828761e366e67 (diff)
downloadsmap-97abef53d67ffb95f566bc0b457a99e51775187b.tar.gz
smap-97abef53d67ffb95f566bc0b457a99e51775187b.tar.bz2
Bugfix.
* src/close-fds.c (close_fds_except): Use FD_SETSIZE instead of getmaxfd
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--src/close-fds.c2
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);
}

Return to:

Send suggestions and report system problems to the System administrator.