[cups.development] cupsd to backend interface

Michael Sweet mike at easysw.com
Tue Feb 8 10:43:56 PST 2005


Jim Fehlig wrote:
> While developing a backend I have encountered some issues that have 
> proved difficult to solve.  They all appear to be a consequence of a 
> backend's exit options - zero for success or non-zero in the event of an 
> error.  Consider the following scenarios.
> 
> cupsd invokes the backend to submit a job.  The backend contacts the 
> recipient but it does not accept the job due to
> 
> - authentication credentials missing or wrong
> - job size too big
> - user not permitted to access the queue
> - job data format not supported by the server
> - ...
> ...
> I realize that many details have been ignored in this discussion but 
> just wanted to see how other backend writers are handling issues related 
> to job-specific failures when communicating with their targets.

Since we haven't standardized on return codes previously, I'm not
sure what the effect would be if we changed things in 1.2.  All of
the standard backends in CUPS return 0 or 1, however the smbspool
backend from Samba returns 0, 1, or a Samba-defined status code > 0
on error.

That said, I'm not against standardizing the return values from
backends and filters for 1.2.  Aside from making error handling
more consistent and offering potentially better debugging info,
this would also enhance the policy stuff that is part of 1.2,
where you can define the policy for failed jobs (drop, stop, retry,
etc.)

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com




More information about the cups mailing list