From 6f67efbc27de25989b0430f286a2011b9417c02e Mon Sep 17 00:00:00 2001 From: mike Date: Wed, 18 Aug 2004 17:57:53 +0000 Subject: [PATCH] Added a ReloadTimeout directive to control how long the scheduler waits for jobs to complete before restarting the scheduler (STR #861) git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4370 7a7537e8-13f0-0310-91df-b6672ffda945 --- CHANGES.txt | 3 +++ man/cupsd.conf.man | 11 ++++++++--- scheduler/conf.c | 6 ++++-- scheduler/conf.h | 6 ++++-- scheduler/main.c | 6 +++--- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 4008a54ed..379a8c3f7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,9 @@ CHANGES.txt - 08/18/2004 CHANGES IN CUPS V1.1.21rc2 + - Added a ReloadTimeout directive to control how long + the scheduler waits for jobs to complete before + restarting the scheduler (STR #861) - Added a note to the default cupsd.conf file which mentions that you must allow connections from localhost for the command-line and web interfaces to diff --git a/man/cupsd.conf.man b/man/cupsd.conf.man index e646f4c71..e919f650c 100644 --- a/man/cupsd.conf.man +++ b/man/cupsd.conf.man @@ -1,5 +1,5 @@ .\" -.\" "$Id: cupsd.conf.man,v 1.13 2004/08/11 13:48:15 mike Exp $" +.\" "$Id: cupsd.conf.man,v 1.14 2004/08/18 17:57:52 mike Exp $" .\" .\" cupsd.conf man page for the Common UNIX Printing System (CUPS). .\" @@ -21,7 +21,7 @@ .\" EMail: cups-info@cups.org .\" WWW: http://www.cups.org .\" -.TH cupsd.conf 5 "Common UNIX Printing System" "1 July 2004" "Easy Software Products" +.TH cupsd.conf 5 "Common UNIX Printing System" "18 August 2004" "Easy Software Products" .SH NAME cupsd.conf \- server configuration file for cups .SH DESCRIPTION @@ -313,6 +313,11 @@ PrintcapGUI Specifies whether to generate option panel definition files on some operating systems. .TP 5 +ReloadTimeout +.br +Specifies the amount of time to wait for job completion before +restarting the scheduler. +.TP 5 RemoteRoot .br Specifies the username that is associated with unauthenticated root @@ -402,5 +407,5 @@ http://localhost:631/documentation.html .SH COPYRIGHT Copyright 1993-2004 by Easy Software Products, All Rights Reserved. .\" -.\" End of "$Id: cupsd.conf.man,v 1.13 2004/08/11 13:48:15 mike Exp $". +.\" End of "$Id: cupsd.conf.man,v 1.14 2004/08/18 17:57:52 mike Exp $". .\" diff --git a/scheduler/conf.c b/scheduler/conf.c index af3c93f3b..532be8578 100644 --- a/scheduler/conf.c +++ b/scheduler/conf.c @@ -1,5 +1,5 @@ /* - * "$Id: conf.c,v 1.149 2004/07/06 00:34:56 mike Exp $" + * "$Id: conf.c,v 1.150 2004/08/18 17:57:53 mike Exp $" * * Configuration routines for the Common UNIX Printing System (CUPS). * @@ -125,6 +125,7 @@ static var_t variables[] = { "PreserveJobHistory", &JobHistory, VAR_BOOLEAN }, { "Printcap", &Printcap, VAR_STRING }, { "PrintcapGUI", &PrintcapGUI, VAR_STRING }, + { "ReloadTimeout", &ReloadTimeout, VAR_INTEGER }, { "RemoteRoot", &RemoteRoot, VAR_STRING }, { "RequestRoot", &RequestRoot, VAR_STRING }, { "RIPCache", &RIPCache, VAR_STRING }, @@ -355,6 +356,7 @@ ReadConfiguration(void) MaxLogSize = 1024 * 1024; MaxPrinterHistory = 10; MaxRequestSize = 0; + ReloadTimeout = 60; RootCertDuration = 300; RunAsUser = FALSE; Timeout = DEFAULT_TIMEOUT; @@ -2226,5 +2228,5 @@ CDSAGetServerCerts(void) /* - * End of "$Id: conf.c,v 1.149 2004/07/06 00:34:56 mike Exp $". + * End of "$Id: conf.c,v 1.150 2004/08/18 17:57:53 mike Exp $". */ diff --git a/scheduler/conf.h b/scheduler/conf.h index 2d3661228..dc81e6066 100644 --- a/scheduler/conf.h +++ b/scheduler/conf.h @@ -1,5 +1,5 @@ /* - * "$Id: conf.h,v 1.62 2004/04/20 13:34:49 mike Exp $" + * "$Id: conf.h,v 1.63 2004/08/18 17:57:53 mike Exp $" * * Configuration file definitions for the Common UNIX Printing System (CUPS) * scheduler. @@ -96,6 +96,8 @@ VAR char *SystemGroups[MAX_SYSTEM_GROUPS], /* GUI program to use for IRIX */ *FontPath VALUE(NULL), /* Font search path */ + *ReloadTimeout VALUE(0), + /* Timeout before reload from SIGHUP */ *RemoteRoot VALUE(NULL), /* Remote root user */ *Classification VALUE(NULL); @@ -195,5 +197,5 @@ extern int LogPage(job_t *job, const char *page); /* - * End of "$Id: conf.h,v 1.62 2004/04/20 13:34:49 mike Exp $". + * End of "$Id: conf.h,v 1.63 2004/08/18 17:57:53 mike Exp $". */ diff --git a/scheduler/main.c b/scheduler/main.c index d488a8a99..d9fc6c9c7 100644 --- a/scheduler/main.c +++ b/scheduler/main.c @@ -1,5 +1,5 @@ /* - * "$Id: main.c,v 1.120 2004/07/01 21:26:41 mike Exp $" + * "$Id: main.c,v 1.121 2004/08/18 17:57:53 mike Exp $" * * Scheduler main loop for the Common UNIX Printing System (CUPS). * @@ -495,7 +495,7 @@ main(int argc, /* I - Number of command-line arguments */ */ if ((NumClients == 0 && (!job || NeedReload != RELOAD_ALL)) || - (time(NULL) - ReloadTime) >= 60) + (time(NULL) - ReloadTime) >= ReloadTime) { if (!ReadConfiguration()) { @@ -1317,5 +1317,5 @@ usage(void) /* - * End of "$Id: main.c,v 1.120 2004/07/01 21:26:41 mike Exp $". + * End of "$Id: main.c,v 1.121 2004/08/18 17:57:53 mike Exp $". */ -- 2.39.5