Cups scheduler do not start backend for each file for jobs with printmultiple files

Mario Goppold ml at goppold.net
Thu Jul 29 00:49:41 PDT 2010


> On Jul 28, 2010, at 12:18 AM, Mario Goppold wrote:
> > Thank you for your assistance.
> > In other words I have to deal with =
> $CUPS_REQUESTROOT/d(.*)-([0-9][0-9][0-9]) like I did before? That =
> answered the question why the filenames are not dropped down to the =
> backend too.
>
> No, you shouldn't be accessing the job data files unless they are passed =
> on the command-line. Backends, like filters, should never make =
> assumptions about the locations or names of the job data or control =
> files since those could change in new CUPS releases.

I know that is not the way to write stable and portable software, but I need to know in the backend that the job contains more than one file and how to access them.

>
> Currently there is no way for a backend to advertise that it can handle =
> more than 1 filename on the command-line - if you are looking for a way =
> to send multiple files unfiltered from your backend, please file a =
> feature request and we'll see about extending the backend interface (we =
> already support multiple file submission for the IPP backend...):
>
>     http://www.cups.org/str.php
>

I have test it by:
lpadmin -p test -v ipp://hp2/ipp -i /usr/share/cups/model/Generic/PostScript_Printer-Postscript.ppd.gz -E
lp -d test /tmp/test1.ps /tmp/test2.ps
grep "Job 73" /var/log/cups/error_log

I [29/Jul/2010:09:35:27 +0200] [Job 73] Adding start banner page "none".
I [29/Jul/2010:09:35:27 +0200] [Job 73] Queued on "test" by "root".
D [29/Jul/2010:09:35:27 +0200] [Job 73] Auto-typing file...
D [29/Jul/2010:09:35:27 +0200] [Job 73] Request file type is application/postscript.
I [29/Jul/2010:09:35:27 +0200] [Job 73] File of type application/postscript queued by "root".
D [29/Jul/2010:09:35:27 +0200] [Job 73] Auto-typing file...
D [29/Jul/2010:09:35:27 +0200] [Job 73] Request file type is application/postscript.
I [29/Jul/2010:09:35:27 +0200] [Job 73] File of type application/postscript queued by "root".
I [29/Jul/2010:09:35:27 +0200] [Job 73] Adding end banner page "none".
D [29/Jul/2010:09:35:27 +0200] [Job 73] job-sheets=none,none
D [29/Jul/2010:09:35:27 +0200] [Job 73] argv[0]="test"
D [29/Jul/2010:09:35:27 +0200] [Job 73] argv[1]="73"
D [29/Jul/2010:09:35:27 +0200] [Job 73] argv[2]="root"
D [29/Jul/2010:09:35:27 +0200] [Job 73] argv[3]="test1.ps"
D [29/Jul/2010:09:35:27 +0200] [Job 73] argv[4]="1"
D [29/Jul/2010:09:35:27 +0200] [Job 73] argv[5]="finishings=3 number-up=1 job-uuid=urn:uuid:a18c2d8e-d172-3a73-7750-16158c5ac108 job-originating-host-name=localhost"
D [29/Jul/2010:09:35:27 +0200] [Job 73] argv[6]="/var/spool/cups/d00073-001"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[0]="CUPS_CACHEDIR=/var/cache/cups"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[1]="CUPS_DATADIR=/usr/share/cups"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[2]="CUPS_DOCROOT=/usr/share/cups/webcontent"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[3]="CUPS_FONTPATH=/usr/share/cups/fonts"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[4]="CUPS_REQUESTROOT=/var/spool/cups"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[5]="CUPS_SERVERBIN=/usr/lib/cups"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[6]="CUPS_SERVERROOT=/etc/cups"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[7]="CUPS_STATEDIR=/var/run/cups"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[8]="HOME=/var/spool/cups/tmp"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[9]="PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[10]="SERVER_ADMIN=root at openSUSE103devel64"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[11]="SOFTWARE=CUPS/1.4.4"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[12]="TMPDIR=/var/spool/cups/tmp"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[13]="USER=root"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[14]="CUPS_SERVER=/var/run/cups/cups.sock"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[15]="CUPS_ENCRYPTION=IfRequested"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[16]="CHARSET=utf-8"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[17]="LANG=de_DE.UTF-8"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[18]="PPD=/etc/cups/ppd/test.ppd"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[19]="RIP_MAX_CACHE=8m"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[20]="CONTENT_TYPE=application/postscript"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[21]="DEVICE_URI=ipp://hp2/ipp"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[22]="PRINTER_INFO=test"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[23]="PRINTER_LOCATION="
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[24]="PRINTER=test"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[25]="CUPS_FILETYPE=document"
I [29/Jul/2010:09:35:27 +0200] [Job 73] Started filter /usr/lib/cups/filter/gziptoany (PID 19901)
D [29/Jul/2010:09:35:27 +0200] [Job 73] start backend(ipp) with argv[0]=ipp://hp2/ipp
D [29/Jul/2010:09:35:27 +0200] [Job 73] start backend(ipp) with argv[1]=73
D [29/Jul/2010:09:35:27 +0200] [Job 73] start backend(ipp) with argv[2]=root
D [29/Jul/2010:09:35:27 +0200] [Job 73] start backend(ipp) with argv[3]=test1.ps
D [29/Jul/2010:09:35:27 +0200] [Job 73] start backend(ipp) with argv[4]=1
D [29/Jul/2010:09:35:27 +0200] [Job 73] start backend(ipp) with argv[5]=finishings=3 number-up=1 job-uuid=urn:uuid:a18c2d8e-d172-3a73-7750-16158c5ac108 job-originating-host-name=localhost
I [29/Jul/2010:09:35:27 +0200] [Job 73] Started backend /usr/lib/cups/backend/ipp (PID 19902)
D [29/Jul/2010:09:35:27 +0200] [Job 73] job-sheets=none,none
D [29/Jul/2010:09:35:27 +0200] [Job 73] argv[0]="test"
D [29/Jul/2010:09:35:27 +0200] [Job 73] argv[1]="73"
D [29/Jul/2010:09:35:27 +0200] [Job 73] argv[2]="root"
D [29/Jul/2010:09:35:27 +0200] [Job 73] argv[3]="test1.ps"
D [29/Jul/2010:09:35:27 +0200] [Job 73] argv[4]="1"
D [29/Jul/2010:09:35:27 +0200] [Job 73] argv[5]="finishings=3 number-up=1 job-uuid=urn:uuid:a18c2d8e-d172-3a73-7750-16158c5ac108 job-originating-host-name=localhost"
D [29/Jul/2010:09:35:27 +0200] [Job 73] argv[6]="/var/spool/cups/d00073-002"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[0]="CUPS_CACHEDIR=/var/cache/cups"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[1]="CUPS_DATADIR=/usr/share/cups"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[2]="CUPS_DOCROOT=/usr/share/cups/webcontent"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[3]="CUPS_FONTPATH=/usr/share/cups/fonts"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[4]="CUPS_REQUESTROOT=/var/spool/cups"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[5]="CUPS_SERVERBIN=/usr/lib/cups"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[6]="CUPS_SERVERROOT=/etc/cups"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[7]="CUPS_STATEDIR=/var/run/cups"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[8]="HOME=/var/spool/cups/tmp"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[9]="PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[10]="SERVER_ADMIN=root at openSUSE103devel64"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[11]="SOFTWARE=CUPS/1.4.4"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[12]="TMPDIR=/var/spool/cups/tmp"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[13]="USER=root"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[14]="CUPS_SERVER=/var/run/cups/cups.sock"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[15]="CUPS_ENCRYPTION=IfRequested"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[16]="CHARSET=utf-8"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[17]="LANG=de_DE.UTF-8"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[18]="PPD=/etc/cups/ppd/test.ppd"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[19]="RIP_MAX_CACHE=8m"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[20]="CONTENT_TYPE=application/postscript"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[21]="DEVICE_URI=ipp://hp2/ipp"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[22]="PRINTER_INFO=test"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[23]="PRINTER_LOCATION="
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[24]="PRINTER=test"
D [29/Jul/2010:09:35:27 +0200] [Job 73] envp[25]="CUPS_FILETYPE=document"
I [29/Jul/2010:09:35:27 +0200] [Job 73] Started filter /usr/lib/cups/filter/gziptoany (PID 19903)
D [29/Jul/2010:09:35:27 +0200] [Job 73] PAGE: 1 1
D [29/Jul/2010:09:35:27 +0200] [Job 73] PAGE: 1 1
D [29/Jul/2010:09:35:27 +0200] [Job 73] STATE: +connecting-to-device
D [29/Jul/2010:09:35:27 +0200] [Job 73] Looking up "hp2"...
D [29/Jul/2010:09:35:27 +0200] [Job 73] backendRunLoop(print_fd=-1, device_fd=6, snmp_fd=5, addr=0x555555767ab8, use_bc=0, side_cb=0x555555559db0)
D [29/Jul/2010:09:35:27 +0200] [Job 73] Read 164 bytes of print data...
D [29/Jul/2010:09:35:27 +0200] [Job 73] Wrote 164 bytes of print data...
D [29/Jul/2010:09:35:27 +0200] [Job 73] ATTR: marker-colors=none
D [29/Jul/2010:09:35:27 +0200] [Job 73] ATTR: marker-names="TONERPATRONE HP C4182X"
D [29/Jul/2010:09:35:27 +0200] [Job 73] ATTR: marker-types=toner
D [29/Jul/2010:09:35:27 +0200] [Job 73] ATTR: marker-levels=8
D [29/Jul/2010:09:35:27 +0200] [Job 73] STATE: +media-low-report
D [29/Jul/2010:09:35:27 +0200] [Job 73] STATE: -media-empty-warning
D [29/Jul/2010:09:35:27 +0200] [Job 73] STATE: -toner-low-report
D [29/Jul/2010:09:35:27 +0200] [Job 73] STATE: -toner-empty-warning
D [29/Jul/2010:09:35:27 +0200] [Job 73] STATE: -door-open-report
D [29/Jul/2010:09:35:27 +0200] [Job 73] STATE: -media-jam-warning
D [29/Jul/2010:09:35:27 +0200] [Job 73] STATE: -input-tray-missing-warning
D [29/Jul/2010:09:35:27 +0200] [Job 73] STATE: -output-tray-missing-warning
D [29/Jul/2010:09:35:27 +0200] [Job 73] STATE: -marker-supply-missing-warning
D [29/Jul/2010:09:35:27 +0200] [Job 73] STATE: -output-area-almost-full-report
D [29/Jul/2010:09:35:27 +0200] [Job 73] STATE: -output-area-full-warning
D [29/Jul/2010:09:35:27 +0200] [Job 73] 1 files to send in job...
D [29/Jul/2010:09:35:27 +0200] [Job 73] STATE: +connecting-to-device
D [29/Jul/2010:09:35:27 +0200] [Job 73] Connecting to hp2:631
I [29/Jul/2010:09:35:27 +0200] [Job 73] Mit Drucker verbinden …
D [29/Jul/2010:09:35:27 +0200] [Job 73] STATE: -connecting-to-device
I [29/Jul/2010:09:35:27 +0200] [Job 73] Mit Drucker verbunden …
D [29/Jul/2010:09:35:27 +0200] [Job 73] Connected to 172.17.6.106:631 (IPv4)...
D [29/Jul/2010:09:35:27 +0200] [Job 73] ATTR: marker-levels=8
D [29/Jul/2010:09:35:27 +0200] [Job 73] Getting supported attributes...
D [29/Jul/2010:09:35:27 +0200] [Job 73] document-format-supported (5 values)
D [29/Jul/2010:09:35:27 +0200] [Job 73] [0] = "text/plain"
D [29/Jul/2010:09:35:27 +0200] [Job 73] [1] = "text/plain; charset=US-ASCII"
D [29/Jul/2010:09:35:27 +0200] [Job 73] [2] = "application/postscript"
D [29/Jul/2010:09:35:27 +0200] [Job 73] [3] = "application/vnd.hp-PCL"
D [29/Jul/2010:09:35:27 +0200] [Job 73] [4] = "application/octet-stream"
D [29/Jul/2010:09:35:27 +0200] [Job 73] STATE: none
D [29/Jul/2010:09:35:27 +0200] [Job 73] printer-uri = "ipp://hp2:631/ipp"
D [29/Jul/2010:09:35:27 +0200] [Job 73] requesting-user-name = "root"
D [29/Jul/2010:09:35:27 +0200] [Job 73] job-name = "test1.ps"
N [29/Jul/2010:09:35:27 +0200] [Job 73] Druckdatei akzeptiert – Druckauftrags-ID 3.
D [29/Jul/2010:09:35:27 +0200] [Job 73] Set job-printer-state-message to "Druckdatei akzeptiert – Druckauftrags-ID 3.", current level=INFO
I [29/Jul/2010:09:35:27 +0200] [Job 73] Warten, bis der Druckauftrag agbeschlossen ist …
D [29/Jul/2010:09:35:27 +0200] [Job 73] STATE: none
D [29/Jul/2010:09:35:27 +0200] [Job 73] ATTR: marker-levels=8
D [29/Jul/2010:09:35:27 +0200] [Job 73] STATE: +media-empty-warning
D [29/Jul/2010:09:35:27 +0200] [Job 73] ATTR: auth-info-required=none
I [29/Jul/2010:09:35:27 +0200] [Job 73] Bereit zum Drucken
I [29/Jul/2010:09:35:27 +0200] [Job 73] Job completed.
D [29/Jul/2010:09:35:28 +0200] [Job 73] Unloading...

I can't see how the ipp backend get the two files. The scheduler passed 5 arguments to the backend and the ipp backend (Line 483) says "1 files to send in job...". Are the 2 Jobs concated to one file for the backend?


> >=20
> > Mario
> >=20
> >> On Jul 27, 2010, at 6:28 AM, Mario Goppold wrote:
> >>> Hi,
> >>> =3D20
> >>> for jobs with more than one file the filter chain is called for each =
> =3D
> >> file but there ist only one call for the backend of the whole job.
> >>> =3D20
> >>> Is this supposed to be like this?
> >>=20
> >> Yes, otherwise multiple-file jobs (and this includes jobs with banner =
> =3D
> >> pages) can end up with intervening jobs on the printer.
> >>=20
> >> Consider:
> >>=20
> >>    Client A -> Printer
> >>    Client B -> Printer
> >>=20
> >> If Client A and Client B both have jobs pending for the same printer, =
> =3D
> >> each client needs to hold a connection to the printer for the entire =
> =3D
> >> job, otherwise the other client's jobs can get mixed in...
> >>=20
> >> =
> ________________________________________________________________________
> >> Michael Sweet, Senior Printing System Engineer, PWG Chair
> >>=20
> >>=20
> >>=20
> >>=20
> >=20
> > _______________________________________________
> > cups-bugs mailing list
> > cups-bugs at easysw.com
> > http://lists.easysw.com/mailman/listinfo/cups-bugs
>
> ________________________________________________________________________
> Michael Sweet, Senior Printing System Engineer, PWG Chair
>
>
>
>





More information about the cups-devel mailing list