Created
October 27, 2010 18:59
-
-
Save peterhost/649710 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
--- screen.c.orig 2009-01-21 12:06:11.000000000 +0800 | |
+++ screen.c 2009-01-21 12:08:27.000000000 +0800 | |
@@ -101,6 +101,11 @@ | |
#include "logfile.h" /* islogfile, logfflush */ | |
+#ifdef __APPLE__ | |
+#include <vproc.h> | |
+#include "vproc_priv.h" | |
+#endif | |
+ | |
#ifdef DEBUG | |
FILE *dfp; | |
#endif | |
@@ -1211,6 +1216,11 @@ | |
freopen("/dev/null", "w", stderr); | |
debug("-- screen.back debug started\n"); | |
+#ifdef __APPLE__ | |
+ if (_vprocmgr_move_subset_to_user(real_uid, "Background", 0) != NULL) | |
+ errx(1, "can't migrate to background session"); | |
+#endif | |
+ | |
/* | |
* This guarantees that the session owner is listed, even when we | |
* start detached. From now on we should not refer to 'LoginName' |
make chokes on the _vprocmgr_move_subset_to_user function (source here http://www.opensource.apple.com/source/launchd/launchd-329.3/launchd/src/vproc_priv.h) which needs 3 arguments.
I just added 0 for the 'uint64_t flags' argument
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Original patch from macports :
http://trac.macports.org/browser/trunk/dports/sysutils/screen/files/patch-screen.c-leopard