Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ lpd(1M) — A/UX 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

lpc(1M)

pac(1)

lpr(1)

lpq(1)

lprm(1)

syslog(3)

printcap(4)




lpd(1M) lpd(1M)
NAME lpd - 4.2 line-printer daemon SYNOPSIS /usr/lib/lpd [ -l ] [ port # ] DESCRIPTION lpd is the line-printer daemon (spool area handler) and is normally invoked at boot time from the inittab(4) file. It makes a single pass through the printcap(4) file to find out about the existing printers and prints any files left after a crash. It then uses the system calls listen(2) and ac- cept(2) to receive requests to print files in the queue, transfer files to the spooling area, display the queue, or remove jobs from the queue. In each case, it forks a child to handle the request so the parent can continue to listen for more requests. The Internet port number used to rendez- vous with other processes is normally obtained with get- servbyname(3) but can be changed with the port# argument. The -l flag causes lpd to log valid requests received from the network. This can be useful for debugging purposes. Access control is provided by two means. First, all requests must come from one of the machines listed in the file /etc/hosts.equiv or /etc/hosts.lpd. Second, if the ``rs'' capability is specified in the printcap entry for the printer being accessed, lpr requests are only honored for those users with accounts on the machine with the printer. The file minfree in each spool directory contains the number of disk blocks to leave free so that the line printer queue won't completely fill the disk. The minfree file can be edited with your favorite text editor. The file lock in each spool directory is used to prevent multiple daemons from becoming active simultaneously and to store information about the daemon process for lpr(1), lpq(1), and lprm(1). After the daemon has successfully set the lock, it scans the directory for files beginning with cf. Lines in each cf file specify files to be printed or specify non-printing actions to be performed. Each such line begins with a key character to specify what to do with the remainder of the line: J Job name: string to be used for the job name on the banner page (the page with the job ID) C Classification: string to be used for the classifica- tion line on the banner page L Literal: the line containing identification info from the password file and causing the banner page to be April, 1990 1



lpd(1M) lpd(1M)
printed T Title: string to be used as the title for pr(1) H Host name: name of the machine where lpr was invoked P Person: login name of the person who invoked lpr that is used to verify ownership by lprm M Mail: mail to be sent to the specified user when the current print job completes f Formatted file: the name of a file already formatted, which is to be printed l Similar to ``f,'' but also passing control characters and not making page breaks p Filename: name of a file to be printed using pr(1) as a filter t Troff file: the file containing troff(1) output (cat phototypesetter commands) n Ditroff file: the file containing device-independent troff output d DVI file: the file containing Tex(l) output (DVI for- mat from Stanford) g Graph file: the file containing data produced by plot(3X) c Cifplot file: the file containing data produced by cif- plot v the file containing a raster image r the file containing text data with FORTRAN carriage- control characters 1 Troff Font R: the name of the font file to use instead of the default 2 Troff Font I: the name of the font file to use instead of the default 3 Troff Font B: the name of the font file to use instead of the default 4 Troff Font S: the name of the font file to use instead of the default 2 April, 1990



lpd(1M) lpd(1M)
W Width: the number of characters to specify the page width used by pr(1) and the text filters I Indent: the number of characters to indent the output by (in ASCII output) U Unlink: the name of the file to be removed on comple- tion of printing N Filename: the name of the file that is being printed, or a blank for the standard input (when lpr is invoked in a pipeline) If a file cannot be opened, a message is logged via sys- log(3) by using the LOG_LPR facility. lpd tries up to 20 times to reopen a file it expects to be there, after which it skips the file to be printed. lpd uses flock(2) to provide exclusive access to the lock file and to prevent multiple daemons from becoming active simultaneously. If the daemon should be killed or die unex- pectedly, the lock file need not be removed. The lock file is kept in a readable ASCII form and contains two lines. The first line is the process ID of the daemon, and the second is the control filename of the current job being printed. The second line is updated to reflect the current status of lpd for the programs lpq(1) and lprm(1). FILES /etc/printcap Printer description file /usr/spool/* Spool directories /usr/spool/*/minfree Minimum free space to leave /dev/printer Line-printer device /dev/printer.socket Socket for local requests /etc/hosts.equiv Lists of machine names allowed printer access /etc/hosts.lpd Lists of machine names allowed printer access, but not under same administrative control SEE ALSO lpc(1M), pac(1), lpr(1), lpq(1), lprm(1), syslog(3), printcap(4). April, 1990 3

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026