15.7. Printing Job Files

Options used:



Sequence of Operations: for each job in listed in the control file, the following operations are done in turn.

  1. If there is an :of filter present, the suspend string \031\001 is written to of_fd and the no further action is taken until the of filter is suspended.

  2. The control file line for the job is examined, and the first letter of the data file specification is used as the format.

  3. If the format is p, the job is first processed by the program specified by the pr program, and the program output used as the print file.

  4. If the format is f, l, or p then the :if filter is used, otherwise the keyword Xf is used. Note that certain formats such as p, a, l, may not be used as formats.

  5. The filter program is started with an appropriate set of command line options (see Filter Command Line Options and Environment Variables ), and with its STDOUT attached to the printing device (io_fd), STDERR to a pipe which results in the output being written to the status file. If debugging is enabled, then the STDERR output is also written to the error log file (lf).

  6. When doing a read/write operation to a device or remote system, a timeout can be specified. When doing a print or job transfer operation, the send_job_rw_timeout value is used. When doing a status or query operation, the send_query_rw_timeout value is used. If a write or write operation does not complete within the specified timeout seconds, then we have an error condition and job processing or the query operation is terminated with JFAIL status. If the timeout value is 0, then no timeout is done.

  7. lpd will then wait for the filter to exit. The following exit codes are used by lpd:

        Key      Value   Meaning
        JSUCC    0       Successful
        JFAIL    1, 32   Failed - retry later
        JABORT   2, 33   Abort - terminate queue processing
        JREMOVE  3, 34   Failed - remove job
        (Unused) 4, 35
        (Unused) 5, 36
        JHOLD    6, 37   Hold this job - reprint later
        JNOSPOOL 7, 38   No spooling to this queue
        JNOPRINT 8, 39   No printing from this queue
        JSIGNAL  9,  40   Killed by unrecognized signal
        JFAILNORETRY 10, 41 Failed, no retry
        Other            Abort - terminate queue processing
    


  8. If the filter exit status was JSUCC (0), or no error indicated, then processing will continue otherwise the job termination takes (see Abnormal Termination ).

  9. If the :of filter is present, then it is reactivated with a kill -CONT signal.

  10. The the sf (suppress FF print file separators ) is turned off a form feed is sent between each file of a job.