Parse config later
This is just to keep the list of open file descriptors tidier, since parsing the config creates many pipes.
This commit is contained in:
parent
a6b78bc827
commit
0d7303e75f
3
daemon.c
3
daemon.c
@ -224,7 +224,6 @@ int main(int argc, char *argv[]) {
|
||||
break; default: return EX_USAGE;
|
||||
}
|
||||
}
|
||||
parseConfig(true, configPath);
|
||||
|
||||
int error = access(serviceDir, X_OK);
|
||||
if (error) err(EX_NOINPUT, "%s", serviceDir);
|
||||
@ -276,6 +275,8 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
openlog(getprogname(), LOG_NDELAY | LOG_PID | LOG_PERROR, LOG_DAEMON);
|
||||
|
||||
parseConfig(true, configPath);
|
||||
|
||||
if (daemonize) {
|
||||
error = daemon(0, 0);
|
||||
if (error) {
|
||||
|
Loading…
Reference in New Issue
Block a user