]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix regression in fix for rdar://40436080.
authorMichael R Sweet <michael.r.sweet@gmail.com>
Sun, 19 Aug 2018 13:14:52 +0000 (09:14 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Sun, 19 Aug 2018 13:14:52 +0000 (09:14 -0400)
scheduler/main.c

index 371dce549b055eb448bc634742518b7419c5a83d..e9d98720b98babd6c438f96c8f2a2a5acae6e425 100644 (file)
@@ -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__ */
 }