Fix call to daemon() to make it not change the working directory
authorArt Cancro <ajc@citadel.org>
Tue, 30 Jan 2018 02:42:47 +0000 (21:42 -0500)
committerArt Cancro <ajc@citadel.org>
Tue, 30 Jan 2018 02:42:47 +0000 (21:42 -0500)
webcit-ng/main.c

index 4270d3c5d3151ef7a7209bab9e95108ba7cd02d1..50c26160c29f569259bab52eff19f8099542aba5 100644 (file)
@@ -125,7 +125,7 @@ int main(int argc, char **argv)
 
        /* Go into the background if we were asked to run as a daemon */
        if (running_as_daemon) {
-               daemon(0, 0);
+               daemon(1, 0);
                if (pid_file != NULL) {
                        FILE *pfp = fopen(pid_file, "w");
                        if (pfp) {