Merge branch 'master' of git://tinc-vpn.org/tinc into 1.1
[tinc] / src / tincd.c
index 1008f88..3cbac4b 100644 (file)
@@ -389,6 +389,12 @@ int main(int argc, char **argv) {
 
        g_argv = argv;
 
+       if(getenv("LISTEN_PID") && atoi(getenv("LISTEN_PID")) == getpid())
+               do_detach = false;
+#ifdef HAVE_UNSETENV
+       unsetenv("LISTEN_PID");
+#endif
+
        init_configuration(&config_tree);
 
        /* Slllluuuuuuurrrrp! */