Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Commit 8da75a4

Browse files
dgoodladMikeMcQuaid
authored andcommitted
Make tmux work with osx pasteboard
Via https://gist.github.com/644805 Uses the private api call _vprocmgr_detach_from_console similar to Apple's patch to GNU screen Signed-off-by: Mike McQuaid <[email protected]>
1 parent 7e7e2c4 commit 8da75a4

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

Library/Formula/tmux.rb

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff 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
2330
end
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)

0 commit comments

Comments
 (0)