]> tinc-vpn.org Git - tinc/blobdiff - src/process.c
Chdir() to the configuration directory instead of /.
[tinc] / src / process.c
index cbc816be5b5667c2100e07f671929cffe7d2c8fc..5d78c2954b4604fc447668470e7b72a175d4f451 100644 (file)
@@ -203,7 +203,7 @@ bool detach(void) {
 
        if(do_detach) {
 #ifndef HAVE_MINGW
-               if(daemon(0, 0)) {
+               if(daemon(1, 0)) {
                        logger(DEBUG_ALWAYS, LOG_ERR, "Couldn't detach from terminal: %s", strerror(errno));
                        return false;
                }