This repository was archived by the owner on Jan 16, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,13 @@ class Tmux <Formula
77
88 depends_on 'libevent'
99
10+ def patches
11+ # Patch originally from Macports ticket #18357
12+ # Committed in Macports rev 58563
13+ # https://trac.macports.org/changeset/58563
14+ { :p1 => DATA }
15+ end
16+
1017 def install
1118 ENV [ 'PREFIX' ] = prefix
1219 system "./configure"
@@ -21,3 +28,28 @@ def install
2128 system "make install"
2229 end
2330end
31+
32+ __END__
33+ diff -Nur tmux-1.3/server.c tmux-1.3.new/server.c
34+ --- tmux-1.3/server.c 2010-06-23 09:21:39.000000000 +1000
35+ +++ tmux-1.3.new/server.c 2010-11-29 08:48:48.000000000 +1100
36+ @@ -35,6 +35,8 @@
37+ #include <time.h>
38+ #include <unistd.h>
39+
40+ +void *_vprocmgr_detach_from_console(unsigned int flags);
41+ +
42+ #include "tmux.h"
43+
44+ /*
45+ @@ -137,8 +139,8 @@
46+ * Must daemonise before loading configuration as the PID changes so
47+ * $TMUX would be wrong for sessions created in the config file.
48+ */
49+ - if (daemon(1, 0) != 0)
50+ - fatal("daemon failed");
51+ + if (_vprocmgr_detach_from_console(0) != NULL)
52+ + fatalx("_vprocmgr_detach_from_console failed");
53+
54+ /* event_init() was called in our parent, need to reinit. */
55+ if (event_reinit(ev_base) != 0)
You can’t perform that action at this time.
0 commit comments