[Printing-architecture] printers.conf frequently gets truncated to zero length after unclean shutdowns

Michael Sweet msweet at apple.com
Tue Jul 23 12:08:07 UTC 2013


On 2013-07-23, at 5:08 AM, Tim Waugh <twaugh at redhat.com> wrote:
> On Mon, 2013-07-22 at 23:00 -0400, Michael Sweet wrote:
>> The problem with fsync() is that it is a blocking API. Blocking cupsd
>> (single-threaded daemon process) is *not* a good idea.
> Aren't changes to printers.conf deferred anyway, to allow changes to be
> batched up? So it wouldn't be an fsync call every time the values
> change, but every time those values are written back -- which is much
> less often on a busy system.

They are batched up, but blocking every 30 seconds is still going to cause support calls about cupsd being unresponsive, and (I hope) more calls than "I lost my printer configuration because my system crashed" (which I really hope is not common; who wants to depend on flakey hardware?)

Michael Sweet, Senior Printing System Engineer, PWG Chair

More information about the Printing-architecture mailing list