diff options
| author | evanl <none@none> | 2006-10-13 12:08:49 -0700 |
|---|---|---|
| committer | evanl <none@none> | 2006-10-13 12:08:49 -0700 |
| commit | 8f379ff8b85682de48eecc7df2eb8a2db96e852f (patch) | |
| tree | 90f8095874ff768991ed5fb162079a0c31f52310 /usr/src/cmd/fs.d/autofs/autod_main.c | |
| parent | 92f381329ebf1c2209df9608670666b32b291e05 (diff) | |
| download | illumos-joyent-8f379ff8b85682de48eecc7df2eb8a2db96e852f.tar.gz | |
6474978 hung rpc calls cause automounter to hang
6475460 The automounter is file descriptor challenged
Diffstat (limited to 'usr/src/cmd/fs.d/autofs/autod_main.c')
| -rw-r--r-- | usr/src/cmd/fs.d/autofs/autod_main.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/usr/src/cmd/fs.d/autofs/autod_main.c b/usr/src/cmd/fs.d/autofs/autod_main.c index 3b64fcc902..5aa5ff13f5 100644 --- a/usr/src/cmd/fs.d/autofs/autod_main.c +++ b/usr/src/cmd/fs.d/autofs/autod_main.c @@ -90,13 +90,6 @@ extern int _autofssys(int, void *); #define CTIME_BUF_LEN 26 -/* - * XXX - this limit was imposed due to resource problems - even though - * we can and do try and set the rlimit to be able to handle more threads, - * fopen() doesn't allow more than 256 fp's. - */ -#define MAXTHREADS 64 - #define RESOURCE_FACTOR 8 #ifdef DEBUG #define AUTOFS_DOOR "/var/run/autofs_door" @@ -210,6 +203,19 @@ main(argc, argv) (void) ns_setup(NULL, NULL); /* + * we're using doors and its thread management now so we need to + * make sure we have more than the default of 256 file descriptors + * available. + */ + rlset.rlim_cur = RLIM_INFINITY; + rlset.rlim_max = RLIM_INFINITY; + if (setrlimit(RLIMIT_NOFILE, &rlset) == -1) + syslog(LOG_ERR, "setrlimit failed for %s: %s", AUTOMOUNTD, + strerror(errno)); + + (void) enable_extended_FILE_stdio(-1, -1); + + /* * establish our lock on the lock file and write our pid to it. * exit if some other process holds the lock, or if there's any * error in writing/locking the file. |
