From 0d7303e75f6081f206aa4162a34c79bacd752264 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sat, 15 Aug 2020 18:40:51 -0400 Subject: Parse config later This is just to keep the list of open file descriptors tidier, since parsing the config creates many pipes. --- daemon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemon.c b/daemon.c index 2e58c82..86d69f0 100644 --- a/daemon.c +++ b/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) { -- cgit 1.4.1