QNX Developer Support
|This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.|
Line printer spooler daemon
lpd [-ln] [portnum]
- ("el") Log valid requests received from the network. This can be useful for debugging purposes.
- 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.
- 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.
The lpd daemon makes a single pass through the printcap database, restarting any printers that have jobs. The daemon listens for requests to:
- print files in the queue
- transfer files to the spooling area
- display the queue
- remove jobs from the queue.
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:
- All requests must come from one of the machines listed in the file /etc/hosts.equiv or /etc/hosts.lpd.
- If the rs capability is specified in the printcap entry for the printer being accessed, lpr requests are honored only for those users with accounts on the machine with the printer.
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.
|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.
|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.|
- Printer description file.
- Spool directories.
- Minimum free space to leave.
- A list of machine names that are allowed to access the printers.
- A list of machine names that are allowed to access the printers, but not under the same administrative control.
Printing chapter of the Neutrino User's Guide