The lpd program acts as a master server for coordinating and controlling the spooling queues configured in the /etc/printcap file.
When you starts lpd, it makes a single pass through the /etc/printcap database, restarting any printers that have jobs. In normal operation, lpd listens for service requests on a socket within the Internet domain (under the "printer" service specification) for requests for printer access.
The daemon spawns a copy of itself to process the request; the master daemon continues to listen for new requests. The daemons use simple text files as lock files for synchronization; the parent daemon uses /usr/spool/output/lpd.lock, while its children use a .lock file in the printer's spool directory, as specified in the printcap file.
Clients communicate with lpd using a simple transaction-oriented protocol. Authentication of remote clients is done based on the "privileged port" scheme employed by rshd. See "Access control," below.