diff options
author | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2015-02-06 21:43:23 +0000 |
---|---|---|
committer | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2015-02-06 21:43:23 +0000 |
commit | 64dda3963f4d582d17aaea7b43233e29e2cef9a0 (patch) | |
tree | ffe9111b5c8c9a3158148900cc4b3161a4ae229d /scheduler/cups-lpd.c | |
parent | 543507bea212d99ccad4470e24edf789da1567bc (diff) | |
download | cups-64dda3963f4d582d17aaea7b43233e29e2cef9a0.tar.gz |
Enable transaction and pressured exit support (<rdar://problem/19749501>)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12493 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'scheduler/cups-lpd.c')
-rw-r--r-- | scheduler/cups-lpd.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/scheduler/cups-lpd.c b/scheduler/cups-lpd.c index 50a5cb1f4..9df6bd0bd 100644 --- a/scheduler/cups-lpd.c +++ b/scheduler/cups-lpd.c @@ -3,7 +3,7 @@ * * Line Printer Daemon interface for CUPS. * - * Copyright 2007-2014 by Apple Inc. + * Copyright 2007-2015 by Apple Inc. * Copyright 1997-2006 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -29,6 +29,9 @@ #ifdef HAVE_INTTYPES_H # include <inttypes.h> #endif /* HAVE_INTTYPES_H */ +#ifdef __APPLE__ +# include <vproc.h> +#endif /* __APPLE__ */ /* @@ -96,6 +99,9 @@ main(int argc, /* I - Number of command-line arguments */ hostip[256], /* IP address */ *hostfamily; /* Address family */ int hostlookups; /* Do hostname lookups? */ +#ifdef __APPLE__ + vproc_transaction_t vtran = vproc_transaction_begin(NULL); +#endif /* __APPLE__ */ /* @@ -211,6 +217,11 @@ main(int argc, /* I - Number of command-line arguments */ syslog(LOG_ERR, "Unable to get command line from client!"); putchar(1); + +#ifdef __APPLE__ + vproc_transaction_end(NULL, vtran); +#endif /* __APPLE__ */ + return (1); } @@ -301,6 +312,10 @@ main(int argc, /* I - Number of command-line arguments */ syslog(LOG_INFO, "Closing connection"); closelog(); +#ifdef __APPLE__ + vproc_transaction_end(NULL, vtran); +#endif /* __APPLE__ */ + return (status); } |