[cups.general] When does CUPS 1.4 cupsd write changes to config files?

Johannes Meixner jsmeix at suse.de
Tue Jul 14 02:55:35 PDT 2009


Hello,

at least up to CUPS 1.3.9 (which I used last) the cupsd
wrote changes to config files sufficiently immediately
which means that one could "assume that the updated files
will be available after the corresponding command,
function call, or IPP operation is completed"
according to

http://www.cups.org/newsgroups.php?s1+gcups.general+v3+T0+Q"When+does+cupsd+write+changes+to+config+files"


Currently I run CUPS 1.4rc1 where this is no longer true
(at least for me).

I have reproducible more than half a minute delay when adding,
changing, and deleting a queue, see below.

Is the delayed write behaviour intentional?

----------------------------------------------------------------------
root at host # date ; \
  stat /etc/cups/printers.conf | grep '2009-07-' ; \
  lpadmin -p testy -v file:/dev/null ; \
  for i in $( seq 100 ) ; \
  do echo -n "$i " ; \
     grep -q 'testy' /etc/cups/printers.conf && break ; \
     sleep 1 ; \
  done ; \
  stat /etc/cups/printers.conf | grep '2009-07-'

Tue Jul 14 11:27:36 CEST 2009

Access: 2009-07-14 11:27:19.000000000 +0200
Modify: 2009-07-14 11:27:18.000000000 +0200
Change: 2009-07-14 11:27:18.000000000 +0200

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
  26 27 28 29 30 31 32

Access: 2009-07-14 11:28:08.000000000 +0200
Modify: 2009-07-14 11:28:07.000000000 +0200
Change: 2009-07-14 11:28:07.000000000 +0200

----------------------------------------------------------------------
root at host # date ; \
  stat /etc/cups/printers.conf | grep '2009-07-' ; \
  lpadmin -p testy -o job-sheets-default=secret,topsecret ; \
  for i in $( seq 100 ) ; \
  do echo -n "$i " ; \
     grep -q 'JobSheets secret topsecret' /etc/cups/printers.conf && break ; \
     sleep 1 ; \
  done ; \
  stat /etc/cups/printers.conf | grep '2009-07-'

Tue Jul 14 11:40:48 CEST 2009

Access: 2009-07-14 11:38:28.000000000 +0200
Modify: 2009-07-14 11:37:39.000000000 +0200
Change: 2009-07-14 11:37:39.000000000 +0200

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
  26 27 28 29 30 31 32

Access: 2009-07-14 11:41:19.000000000 +0200
Modify: 2009-07-14 11:41:19.000000000 +0200
Change: 2009-07-14 11:41:19.000000000 +0200

----------------------------------------------------------------------
root at host # date ; \
  stat /etc/cups/printers.conf | grep '2009-07-' ; \
  lpadmin -x testy ; \
  for i in $( seq 100 ) ; \
  do echo -n "$i " ; \
     grep -q 'testy' /etc/cups/printers.conf || break ; \
     sleep 1 ; \
  done ; \
  stat /etc/cups/printers.conf | grep '2009-07-'

Tue Jul 14 11:45:09 CEST 2009

Access: 2009-07-14 11:41:19.000000000 +0200
Modify: 2009-07-14 11:41:19.000000000 +0200
Change: 2009-07-14 11:41:19.000000000 +0200

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
  26 27 28 29 30 31 32

Access: 2009-07-14 11:45:40.000000000 +0200
Modify: 2009-07-14 11:45:40.000000000 +0200
Change: 2009-07-14 11:45:40.000000000 +0200

----------------------------------------------------------------------


Kind Regards
Johannes Meixner
-- 
SUSE LINUX Products GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany
AG Nuernberg, HRB 16746, GF: Markus Rex





More information about the cups mailing list