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

Michael Sweet msweet at apple.com
Tue Jul 23 03:00:33 UTC 2013


Eric,

On 2013-07-22, at 1:32 PM, Eric Sandeen <sandeen at redhat.com> wrote:
> ..
> Any time an application does buffered IO, and requires it to be there even if we crash, it needs to take steps to persist that data on disk.  See also http://lwn.net/Articles/457667/

The problem with fsync() is that it is a blocking API.  Blocking cupsd (single-threaded daemon process) is *not* a good idea.

Future versions of cupsd will be multi-threaded where we can look at calling fsync or fcntl(fd, F_FULLSYNC), but adding fsync calls now will just cause more problems that it will solve.

_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair



More information about the Printing-architecture mailing list