Backend hangs when more than one file is send for printing

Helge Blischke h.blischke at srz.de
Tue Sep 13 03:38:28 PDT 2005


Mohit Kumar wrote:
> 
> > Mohit Kumar wrote:
> > > Hi All,
> > >
> > > I have written a backend which converts any file to pdf file format. However I am facing a problem.
> > >
> > > When I try to print a file when some other printing to the same backend is happening, the virtual printer seems to get hung.
> > >
> > > Why is it that the jobs are not getting queued, and if they do, then what should I do to enable this?
> >
> > Backends MUST support multiple invocation.  Two queues often share
> > the same backend - usually the device URI is different, but a backend
> > must support multiple queues with the same device URI.
> >
> > --
> >

> Thanks for the info Michael. Could you point me to some examples on how this should be done in the code?
> 
> Thanks,
> Mohit

As you are writing to a file, you'd fiddle around with some serialization mechanism.
The simplest approach is some locking mechanism, be it a lock file, of some system provided
feature lock flock or lockf.

Helge

-- 
Helge Blischke
Softwareentwicklung
SRZ Berlin | Firmengruppe besscom
http://www.srz.de




More information about the cups-devel mailing list