summaryrefslogtreecommitdiffstats
path: root/support/nfs/closeall.c
diff options
context:
space:
mode:
Diffstat (limited to 'support/nfs/closeall.c')
-rw-r--r--support/nfs/closeall.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/support/nfs/closeall.c b/support/nfs/closeall.c
index 38fb162..a69bf35 100644
--- a/support/nfs/closeall.c
+++ b/support/nfs/closeall.c
@@ -31,6 +31,7 @@ closeall(int min)
} else {
int fd = sysconf(_SC_OPEN_MAX);
while (--fd >= min)
- (void) close(fd);
+ if(fd >= 0)
+ (void) close(fd);
}
}