diff options
-rw-r--r-- | org.x.startx.plist.cpp | 2 | ||||
-rw-r--r-- | privileged_startx/org.x.privileged_startx.plist.cpp | 2 | ||||
-rw-r--r-- | xinit.c | 26 |
3 files changed, 30 insertions, 0 deletions
diff --git a/org.x.startx.plist.cpp b/org.x.startx.plist.cpp index 42c9f70..4bcedcf 100644 --- a/org.x.startx.plist.cpp +++ b/org.x.startx.plist.cpp @@ -21,5 +21,7 @@ </dict> <key>ServiceIPC</key> <true/> + <key>EnableTransactions</key> + <true/> </dict> </plist> diff --git a/privileged_startx/org.x.privileged_startx.plist.cpp b/privileged_startx/org.x.privileged_startx.plist.cpp index d0e41a6..fd87478 100644 --- a/privileged_startx/org.x.privileged_startx.plist.cpp +++ b/privileged_startx/org.x.privileged_startx.plist.cpp @@ -17,5 +17,7 @@ </array> <key>TimeOut</key> <integer>120</integer> + <key>EnableTransactions</key> + <true/> </dict> </plist> @@ -60,6 +60,13 @@ in this Software without prior written authorization from The Open Group. #include <setjmp.h> #include <stdarg.h> +#ifdef __APPLE__ +#include <Availability.h> +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 +#include <vproc.h> +#endif +#endif + #if !defined(SIGCHLD) && defined(SIGCLD) #define SIGCHLD SIGCLD #endif @@ -250,6 +257,11 @@ main(int argc, char *argv[], char *envp[]) int client_args_given = 0, server_args_given = 0; int start_of_client_args, start_of_server_args; struct sigaction sa; +#ifdef __APPLE__ +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 + vproc_transaction_t vt; +#endif +#endif #ifdef __UNIXOS2__ envsave = envp; /* circumvent an EMX problem */ @@ -426,6 +438,13 @@ main(int argc, char *argv[], char *envp[]) signal(SIGALRM, sigAlarm); signal(SIGUSR1, sigUsr1); + +#ifdef __APPLE__ +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 + vt = vproc_transaction_begin(NULL); +#endif +#endif + if (startServer(server) > 0 && startClient(client) > 0) { pid = -1; @@ -434,6 +453,13 @@ main(int argc, char *argv[], char *envp[]) ) pid = wait(NULL); } + +#ifdef __APPLE__ +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 + vproc_transaction_end(NULL, vt); +#endif +#endif + signal(SIGTERM, SIG_IGN); signal(SIGQUIT, SIG_IGN); signal(SIGINT, SIG_IGN); |