Guest User

Untitled

a guest
Jun 19th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. --- server.c.orig 2009-09-20 11:11:24.000000000 -0700
  2. +++ server.c 2009-09-30 23:20:05.000000000 -0700
  3. @@ -34,6 +34,8 @@
  4. #include <time.h>
  5. #include <unistd.h>
  6.  
  7. +void *_vprocmgr_detach_from_console(unsigned int flags);
  8. +
  9. #include "tmux.h"
  10.  
  11. /*
  12. @@ -146,8 +148,8 @@
  13. * Must daemonise before loading configuration as the PID changes so
  14. * $TMUX would be wrong for sessions created in the config file.
  15. */
  16. - if (daemon(1, 0) != 0)
  17. - fatal("daemon failed");
  18. + if (_vprocmgr_detach_from_console(0) != NULL)
  19. + fatalx("_vprocmgr_detach_from_console failed");
  20.  
  21. logfile("server");
  22. log_debug("server started, pid %ld", (long) getpid());
Add Comment
Please, Sign In to add comment