|
@ -1603,16 +1603,6 @@ int main(int argc, char **argv) |
|
|
if (nofile == 0) { |
|
|
if (nofile == 0) { |
|
|
nofile = conf->nofile; |
|
|
nofile = conf->nofile; |
|
|
} |
|
|
} |
|
|
/* |
|
|
|
|
|
* no need to check the return value here since we will show |
|
|
|
|
|
* the user an error message if setrlimit(2) fails |
|
|
|
|
|
*/ |
|
|
|
|
|
if (nofile > 1024) { |
|
|
|
|
|
if (verbose) { |
|
|
|
|
|
LOGI("setting NOFILE to %d", nofile); |
|
|
|
|
|
} |
|
|
|
|
|
set_nofile(nofile); |
|
|
|
|
|
} |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
if (conf->nameserver != NULL) { |
|
|
if (conf->nameserver != NULL) { |
|
|
nameservers[nameserver_num++] = conf->nameserver; |
|
|
nameservers[nameserver_num++] = conf->nameserver; |
|
@ -1636,6 +1626,19 @@ int main(int argc, char **argv) |
|
|
timeout = "60"; |
|
|
timeout = "60"; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#ifdef HAVE_SETRLIMIT |
|
|
|
|
|
/* |
|
|
|
|
|
* no need to check the return value here since we will show |
|
|
|
|
|
* the user an error message if setrlimit(2) fails |
|
|
|
|
|
*/ |
|
|
|
|
|
if (nofile > 1024) { |
|
|
|
|
|
if (verbose) { |
|
|
|
|
|
LOGI("setting NOFILE to %d", nofile); |
|
|
|
|
|
} |
|
|
|
|
|
set_nofile(nofile); |
|
|
|
|
|
} |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
if (pid_flags) { |
|
|
if (pid_flags) { |
|
|
USE_SYSLOG(argv[0]); |
|
|
USE_SYSLOG(argv[0]); |
|
|
daemonize(pid_path); |
|
|
daemonize(pid_path); |
|
|