Note: This is a System V Print Subsystem command.
Default printer filter used by interface programs.
/usr/lib/lp/bin/lp.cat [ -r ] [ Rate ]
/usr/lib/lp/bin/lp.set H_pitch V_pitch Width Length Charset
The lp.cat command is the default printer filter called by the interface programs. lp.cat reads the file to be printed on its standard input and writes it to the device to be printed on.
lp.cat handles the following signals:
The lp.cat command aborts a printing job if it has to wait too long on output. The default maximum time to wait is calculated as twice the output buffer size (2 * 1024 bytes) divided by the smallest of the values of the transmission rate, print rate, or the specified Rate (all rates are in characters per second, CPS). A new maximum delay time may be defined by the Rate parameter provided that this increases the delay time. If Rate is 0 then the delay allowed is effectively infinite.
When the -r flag is specified, lp.cat reports the effective throughput in characters per second. This statistic is printed on the standard error after the transmission of every 1024 bytes.
Interface programs may call the lp.set command to set the character pitch (H_pitch), line pitch (V_pitch), page Width, page Length, and character set (Charset) on the printer.
The default units are characters per inch for the character and line pitch, number of columns for width, and number of lines for length. Units may be stated explicitly by appending the values with c for centimeters, and i for inches.
If it cannot set a particular characteristic, lp.set exits with a value of 1 and prints a one letter character code followed by newline to the standard error. The character codes are shown in the following table:
|Character code||Printer characteristic not set|
Interface scripts use lp.tell to forward descriptions of printer faults to the print service. lp.tell sends everything that it reads on its standard input to the print service. The print service forwards the message as an alert to the print administrator.
|-r||Specifies reports the effective throughput in characters per second for the lp.cat command. This statistic is printed on the standard error after the transmission of every 1024 bytes.|
The following table shows the possible exit values for
|0||Normal exit; no error|
|1||Standard input not defined|
|2||Standard output not defined|
|3||Printer type (TERM) not defined or not in terminfo database|
|4||Standard input and output are identical|
|5||Write failed; printer may be off-line|
|6||Excessive delay caused timeout; printer may be off-line|
|7||Hangup (SIGHUP) detected; loss of carrier|
|8||Termination (SIGINT or SIGQUIT), or pipe closed early (SIGPIPE)|
lp.set returns 0 if successful; otherwise it returns 1 on error.
|0||Normal exit; no error|
|1||Cannot open message queue to the print service|
|90||Cannot get printer name or key from print service|
|91||Cannot send message to print service|
|92||Cannot receive acknowledgment from print service|
|93||Corrupted acknowledgment received from print service|
|94||Print service reports message corrupted in transmission|
|/usr/lib/lp/bin/lp.cat||Full pathname of lp.cat|
|/usr/lib/lp/bin/lp.set||Full pathname of lp.set|
|/usr/lib/lp/bin/lp.tell||Full pathname of lp.tell|
|/etc/lp/model||Printer interface programs directory|
|/etc/lp/interfaces||Printer interface programs directory|
The lp command.
The signal subroutine.
The terminfo file.