diff options
| author | neilbrown <neilbrown> | 2003-07-17 23:41:19 +0000 |
|---|---|---|
| committer | neilbrown <neilbrown> | 2003-07-17 23:41:19 +0000 |
| commit | bce6f6871f481087890674497b4b2154dc4825fc (patch) | |
| tree | 51858d7b5ef07ed1244d29856698418756f4b8c3 /utils/mountd | |
| parent | 3094278cd11c3c18d5426210e09e3c903a7a41a3 (diff) | |
| download | nfs-utils-bce6f6871f481087890674497b4b2154dc4825fc.tar.gz nfs-utils-bce6f6871f481087890674497b4b2154dc4825fc.tar.xz nfs-utils-bce6f6871f481087890674497b4b2154dc4825fc.zip | |
Release 1.0.5
Diffstat (limited to 'utils/mountd')
| -rw-r--r-- | utils/mountd/mountd.c | 25 | ||||
| -rw-r--r-- | utils/mountd/mountd.man | 2 |
2 files changed, 14 insertions, 13 deletions
diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c index ae5daa1..d0d8103 100644 --- a/utils/mountd/mountd.c +++ b/utils/mountd/mountd.c @@ -431,7 +431,7 @@ main(int argc, char **argv) char *export_file = _PATH_EXPORTS; int foreground = 0; int port = 0; - int descriptors = 256; + int descriptors = 0; int c; struct sigaction sa; struct rlimit rlim; @@ -498,19 +498,20 @@ main(int argc, char **argv) exit(1); } - if (getrlimit (RLIMIT_NOFILE, &rlim) != 0) { - fprintf(stderr, "%s: getrlimit (RLIMIT_NOFILE) failed: %s\n", - argv [0], strerror(errno)); - exit(1); - } + if (descriptors) { + if (getrlimit (RLIMIT_NOFILE, &rlim) != 0) { + fprintf(stderr, "%s: getrlimit (RLIMIT_NOFILE) failed: %s\n", + argv [0], strerror(errno)); + exit(1); + } - rlim.rlim_cur = descriptors; - if (setrlimit (RLIMIT_NOFILE, &rlim) != 0) { - fprintf(stderr, "%s: setrlimit (RLIMIT_NOFILE) failed: %s\n", - argv [0], strerror(errno)); - exit(1); + rlim.rlim_cur = descriptors; + if (setrlimit (RLIMIT_NOFILE, &rlim) != 0) { + fprintf(stderr, "%s: setrlimit (RLIMIT_NOFILE) failed: %s\n", + argv [0], strerror(errno)); + exit(1); + } } - /* Initialize logging. */ /* xlog_open("mountd"); */ diff --git a/utils/mountd/mountd.man b/utils/mountd/mountd.man index 77f4e26..6e79529 100644 --- a/utils/mountd/mountd.man +++ b/utils/mountd/mountd.man @@ -74,7 +74,7 @@ Display usage message. .TP .B \-o num " or " \-\-descriptors num Set the limit of the number of open file descriptors to num. The -default is 256. +default is to leave the limit unchanged. .TP .B \-N " or " \-\-no-nfs-version This option can be used to request that |
