X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fnfsd%2Fnfsd.c;h=05506ee4ae6c2900fbd2fb4b62749f0789424959;hp=86e809499236c8a4bf3e3bf3c213d91dbcbdf4a1;hb=ac5b03be829b4c9369ebfb07a688308721103228;hpb=87fe487c6f5abe9f40f2f036c3cf6c7f02fa0385 diff --git a/utils/nfsd/nfsd.c b/utils/nfsd/nfsd.c index 86e8094..05506ee 100644 --- a/utils/nfsd/nfsd.c +++ b/utils/nfsd/nfsd.c @@ -7,7 +7,9 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include @@ -80,9 +82,7 @@ main(int argc, char **argv) (void) dup2(fd, 1); (void) dup2(fd, 2); } - fd = sysconf(_SC_OPEN_MAX); - while (--fd > 2) - (void) close(fd); + closeall(3); if ((error = nfssvc(port, count)) < 0) { int e = errno;