lpd

Line printer spooler daemon

Syntax:

lpd [-ln] [portnum]

Runs on:

QNX Neutrino

Options:

-l
("el") Log valid requests received from the network. This can be useful for debugging purposes.
-n
Don't check to see if the job host is included in /etc/hosts.equiv or /etc/hosts.lpd. This option allows anyone on a network to print.
portnum
Although the Internet port number used to rendezvous with other processes is normally obtained with getservbyname(), you can use this option to change the port number.

Description:

The lpd daemon makes a single pass through the printcap database, restarting any printers that have jobs. The daemon listens for requests to:

In each case, lpd forks a child to handle the request, so that the parent can continue to listen for more requests.

Access control is provided by two means:

The lpd daemon uses simple text files as lock files for synchronization. The parent daemon uses the file /usr/spool/output/lpd.lock, while its children use a .lock file within each spool directory specified in the printcap file.

Note: Both the /usr/spool/output and /etc/printcap directories must exist, or lpd won't run. If these directories exist, and lpd still won't run, remove /usr/spool/output/lpd.lock if it exists (e.g, after a power failure or system crash).

The lock file is kept in a readable ASCII form and contains two lines. The first line is the pid of the daemon who owns the lock. The second line of the child's lock file contains the current job or status.

To keep a printer from filling your hard disk, a minfree file may be created in its spool directory. This file should contain the number of blocks (in ASCII) to leave free.

If errors occur, lpd writes messages to the system log. In order to capture the log messages, you need to have syslogd running.

Note: If errors occur, lpd doesn't send much information to standard error, but it saves lots of information in the system log. If you have problems with lpd, the system log will very likely help you figure out what's wrong.

Files:

/etc/printcap
Printer description file.
/usr/spool/*
Spool directories.
/usr/spool/*/minfree
Minimum free space to leave.
/etc/hosts.equiv
A list of machine names that are allowed to access the printers.
/etc/hosts.lpd
A list of machine names that are allowed to access the printers, but not under the same administrative control.