Created
October 25, 2010 11:20
-
-
Save rentalcustard/644805 to your computer and use it in GitHub Desktop.
Fix tmux bootstrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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()); |
Never mind that; it works fine!
Updated gist with original author details and link to relevant MacPorts trac ticket for context. I'm glad this is useful, but I want neither the credit nor the blame!
Thanks for letting me know; I've updated the pull request to homebrew with that info!
I tried applying this patch to tmux 1.4, but no success. It compiles, but pbcopy still does not work. Any success messages out there?
Thanks anyway :-/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Does this patch fix pasteboard interaction for you in Snow Leopard? It applies and compiles fine, and looks to be the appropriate change to make based on apple's patches to GNU Screen, but doesn't seem to have any effect for me.