[cups.general] Backend / Filter Chain

Jeff Hardy hardyjm at potsdam.edu
Mon Nov 8 08:33:10 PST 2004


It sounds like you are trying to write a backend wrapper.  I did the
same thing writing a Perl wrapper for the lpd backend, and I seem to
remember messages similar to yours below.  I had the best luck creating
a new script called (lpdacc) to which I directed jobs that needed
accounting, and this in turn called the lpd backend.  In order to do
this in Perl, this was my system call:

$exitval = system {'/usr/lib/cups/backend/lpd'} @ARGV;
$exitval >>= 8;

Perl and C number their argument arrays differently, and this
compensates for that.  If the exitval from lpd, after a bit-shift, is
zero I know everything worked according to plan and I account for the
job.

For my script, as well as dozens of others you could look at for
reference, check out the links page at cups.org.


On Tue, 2004-10-26 at 08:25, alex at j2anywhere.com wrote:
> I am trying to write an print job interceptor. This best seems to be done in a backend rather then a wrapper. From the previous suggestion to chain filters together I though I could do the same with backends. I created a script which forwards all request to the parallel script. My script is called, but the print job is never forwarded to the "real" backend. The error message indicates that the file "/usr/lib/cups/backend/parallel" is busy. Look like either the file or the device "/dev/lp0" are locked.
> 
> If this assumption is correct :
> -How can I either unlock the file or device or prevent them from being locked in the first place.
> 
> -Could is dis-associate my "fake" backend from the device or file to prevent the lock. I have to admit I don't fully understand how the association occurs.
> 
> Thanks
> Alex
> 
> 
> 
> _______________________________________________
> cups mailing list
> cups at easysw.com
> http://lists.easysw.com/mailman/listinfo/cups
-- 
Jeffrey M. Hardy
Systems Administrator
<hardyjm at potsdam.edu>





More information about the cups mailing list