diff --git a/Formula/tmux.rb b/Formula/tmux.rb index f3cc8c42e89..589a18188ff 100644 --- a/Formula/tmux.rb +++ b/Formula/tmux.rb @@ -7,6 +7,13 @@ class Tmux DATA } + end + def install ENV['PREFIX'] = prefix system "./configure" @@ -21,3 +28,28 @@ class Tmux + #include + ++void *_vprocmgr_detach_from_console(unsigned int flags); ++ + #include "tmux.h" + + /* +@@ -137,8 +139,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"); + + /* event_init() was called in our parent, need to reinit. */ + if (event_reinit(ev_base) != 0)