Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- server.c.orig 2009-09-20 11:11:24.000000000 -0700
- +++ server.c 2009-09-30 23:20:05.000000000 -0700
- @@ -34,6 +34,8 @@
- #include <time.h>
- #include <unistd.h>
- +void *_vprocmgr_detach_from_console(unsigned int flags);
- +
- #include "tmux.h"
- /*
- @@ -146,8 +148,8 @@
- * Must daemonise before loading configuration as the PID changes so
- * $TMUX would be wrong for sessions created in the config file.
- */
- - if (daemon(1, 0) != 0)
- - fatal("daemon failed");
- + if (_vprocmgr_detach_from_console(0) != NULL)
- + fatalx("_vprocmgr_detach_from_console failed");
- logfile("server");
- log_debug("server started, pid %ld", (long) getpid());
Add Comment
Please, Sign In to add comment