From: Michael R Sweet Date: Sun, 19 Aug 2018 13:14:52 +0000 (-0400) Subject: Fix regression in fix for rdar://40436080. X-Git-Tag: v2.3b6~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c463d3fe0cdac4ed29c7124daf04e1fdcfe7186;p=thirdparty%2Fcups.git Fix regression in fix for rdar://40436080. --- diff --git a/scheduler/main.c b/scheduler/main.c index 371dce549b..e9d98720b9 100644 --- a/scheduler/main.c +++ b/scheduler/main.c @@ -151,16 +151,6 @@ main(int argc, /* I - Number of command-line args */ fg = 0; -#ifdef HAVE_LAUNCHD - if (getenv("CUPSD_LAUNCHD")) - { - OnDemand = 1; - fg = 1; - close_all = 0; - disconnect = 0; - } -#endif /* HAVE_LAUNCHD */ - for (i = 1; i < argc; i ++) if (argv[i][0] == '-') for (opt = argv[i] + 1; *opt != '\0'; opt ++) @@ -2100,9 +2090,8 @@ service_checkout(int shutdown) /* I - Shutting down? */ cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to create KeepAlive/PID file \"%s\": %s", pidfile, strerror(errno)); } - # ifdef __APPLE__ - if (shutdown) + if (OnDemand && shutdown) xpc_transaction_end(); # endif /* __APPLE__ */ }