summaryrefslogtreecommitdiffstats
path: root/utils/mountd
diff options
context:
space:
mode:
authorneilbrown <neilbrown>2003-07-17 23:41:19 +0000
committerneilbrown <neilbrown>2003-07-17 23:41:19 +0000
commitbce6f6871f481087890674497b4b2154dc4825fc (patch)
tree51858d7b5ef07ed1244d29856698418756f4b8c3 /utils/mountd
parent3094278cd11c3c18d5426210e09e3c903a7a41a3 (diff)
downloadnfs-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.c25
-rw-r--r--utils/mountd/mountd.man2
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