diff options
author | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2008-08-04 14:40:49 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2008-08-04 14:40:49 -0700 |
commit | 9cc39e441b8741b4b0b878d00e09f0366ff36146 (patch) | |
tree | d735f29c68ba64d1af23563b1c2d07a2488bea74 /xinit.c | |
parent | 7d41013b0e295ec0444c2f9099679bb6018c812f (diff) |
Support the instant-off API in SnowLeopard.
Diffstat (limited to 'xinit.c')
-rw-r--r-- | xinit.c | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -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); |