Normal Termination

LPRng Reference Manual: 24 Sep 2004 (For LPRng-3.8.28)
Prev | Chapter 15. Job Processing | Next

# 15.9. Normal Termination

Options used:

- fq FLAG Form Feed on Close

- la FLAG Local Printer Accounting

- tr=Trailer on Close

- ae=Accounting at end

- save_when_done FLAG Save when done

- save_on_error FLAG Do not delete on error

- done_jobs=NSave status of last N jobs

- wait_for_eof FLAG Wait for EOF before closing device

- socket_lingersocket linger timeout

- half_close FLAG use shutdown() and not close()

Sequence of Operations:

1. If we are printing and the fq flag is set and the sf (suppress interfile FF) flag is set, then the ff (form feed) string will be interpreted and sent to the of_fd.

2. If we are printing, the tr (trailer) string will be interpreted and sent to the of_fd.

3. If printing and the la (local printer accounting) flag is set or transferring a job and the ar (remote accounting) flag is set, the ae is examined and accounting is done as described for the as field.

4. If the :of filter is present, its STDIN is closed, and the lpd server waits for it to exit. The exit status is used as described above.

5. If the device is a socket or network connection, the socket linger time is set to socket_linger value if nonzero.

6. If the half_shut flag is set, then a shutdown(fd,WR_DONE) will be done on the connection. This tells the TCP/IP stack that all data transmission has been completed. Errors or other information can still be read from the connection. If the half_shut flag is clear, then a close(fd) will be done and no errors or other information will be read.

7. If the wait_for_eof option is true (default) then a read is done on the connection until an EOF is found. The device (io_fd) is then closed.

8. The job is marked as completed in the spool queue.

9. If the save_when_done flag is clear and the done_jobs and done_jobs_max_age values are zero (0), the job is removed.

10. If the done_jobs or done_jobs_max_age values are nonzero, the spool queue is periodically checked and for an excess number of jobs or jobs with old status. This action is suppressed if either the save_when_done or save_on_error flag is set.

Prev | Home | Next
Printing Banner At End of Job | Up | Abnormal Termination