[cups.bugs] [LOW] STR #1928: printers.conf race condition?settings lost!

Michael Sweet mike at easysw.com
Tue Aug 22 06:18:41 PDT 2006


Valentijn Sessink wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> 
> At Tue, Aug 22, 2006 at 08:16:05AM -0400, Michael Sweet wrote:
>> The scheduler (cupsd) itself backs the printers.conf file up (rename to
>> printers.conf.O), creates printers.conf, and renames the backup to
>> printers.conf if it is unable to create the new printers.conf file.
> 
> Which means, that if printers.conf is renamed, after that cupsd is stopped
> and restarted? Does cups create a new printers.conf or does it re-rename the
> printers.conf.O file?

If you stop the scheduler via SIGTERM (normal kill), it will finish
writing the printers.conf file before exiting.  If you stop the
scheduler via SIGKILL (kill -9 pid), then the printers.conf may be
potentially left in an unknown/inconsistent state.

The only time the scheduler uses the printers.conf.O file is to
recover from a creation/write error to printers.conf.

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com




More information about the cups mailing list