Created
October 25, 2010 11:20
-
-
Save rentalcustard/644805 to your computer and use it in GitHub Desktop.
Revisions
-
Tom Stuart revised this gist
Nov 29, 2010 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,3 @@ The author of this patch is 'toby' from the MacPorts project, and the original commit containing this diff can be found at [https://trac.macports.org/changeset/58563](https://trac.macports.org/changeset/58563). The trac ticket prompting the commit (and with additional context) is at [https://trac.macports.org/ticket/18357](https://trac.macports.org/ticket/18357). Toby, if you're reading this, apologies for not attributing the gist originally; I put this up quickly while experimenting with tmux under Leopard and abandoned it when it didn't solve the problem at hand. It's only fair now that other people are looking at the gist to give you credit. -
Tom Stuart revised this gist
Nov 29, 2010 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,3 @@ The author of this patch is 'toby' from the MacPorts project, and the original commit containing this diff can be found at (https://trac.macports.org/changeset/58563). The trac ticket prompting the commit (and with additional context) is at (https://trac.macports.org/ticket/18357). Toby, if you're reading this, apologies for not attributing the gist originally; I put this up quickly while experimenting with tmux under Leopard and abandoned it when it didn't solve the problem at hand. It's only fair now that other people are looking at the gist to give you credit. -
Tom Stuart renamed this gist
Nov 29, 2010 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Tom Stuart revised this gist
Nov 29, 2010 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,3 @@ The author of this patch is 'toby' from the MacPorts project, and the original commit containing this diff can be found at [https://trac.macports.org/changeset/58563]. The trac ticket prompting the commit (and with additional context) is at [https://trac.macports.org/ticket/18357]. Toby, if you're reading this, apologies for not attributing the gist originally; I put this up quickly while experimenting with tmux under Leopard and abandoned it when it didn't solve the problem at hand. It's only fair now that other people are looking at the gist to give you credit. -
Tom Stuart revised this gist
Nov 29, 2010 . 2 changed files with 3 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ The author of this patch is 'toby' from the MacPorts project, and the original commit containing this diff can be found at [https://trac.macports.org/changeset/58563]. The trac ticket prompting the commit (and with additional context) is at [https://trac.macports.org/ticket/18357]. 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! Toby, if you're reading this, apologies for not attributing the gist originally; I put this up quickly while experimenting with tmux under Leopard and abandoned it when it didn't solve the problem at hand. It's only fair now that other people are looking at the gist to give you credit. File renamed without changes. -
mortice renamed this gist
Nov 1, 2010 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
mortice renamed this gist
Nov 1, 2010 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -19,4 +19,4 @@ + fatalx("_vprocmgr_detach_from_console failed"); logfile("server"); log_debug("server started, pid %ld", (long) getpid()); -
mortice renamed this gist
Oct 25, 2010 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
mortice created this gist
Oct 25, 2010 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ --- 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());