summaryrefslogtreecommitdiff
path: root/debian/patches/cupsd-idleexittimeout-upstart.patch
blob: 18d96e45a90084549d429ac05a2be56e1c036726 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: Let CUPS stop on 30 seconds idle time if it was started on-demand
 by Upstart
Author: Till Kamppeter <till.kamppeter@gmail.com>,
Bug: https://bugs.launchpad.net/ubuntu/+source/cups/+bug/1276713
--- a/scheduler/main.c
+++ b/scheduler/main.c
@@ -1835,6 +1835,13 @@
   if (_httpAddrPort(&(lis->address)) == 443)
     lis->encryption = HTTP_ENCRYPT_ALWAYS;
 #  endif /* HAVE_SSL */
+
+  /* As we are started on-demand, stop on idle */
+  if (!IdleExitTimeout)
+    IdleExitTimeout = 30;
+  cupsdLogMessage(CUPSD_LOG_DEBUG, "As we are starting on-demand (socket-triggered), activate exit-on-idle mode, timeout: %d seconds.",
+                      IdleExitTimeout);
+
 }
 
 /*