llppsscchheedd -- Command

Print jobs spooled with command lp; turn on printer daemon
llppsscchheedd

The daemon llppsscchheedd prints jobs spooled with the command llpp.

Typing the command llppsscchheedd by itself launches the daemon.  The rest of this
article describes how llppsscchheedd manages printing.

Each file in directory /uussrr/ssppoooolleerr/mmllpp/qquueeuuee is a print job spooled by the
command llpp. When llpp spools a job, it copies the input (usually a file) into
the spool  directory and appends  to the beginning  of each job  a 192-byte
header that indicates  how the job is to be  printed.  This header includes
such information as  the name of the printer on  which to print the job and
the  date and  time the  job was  spooled.  For a  detailed layout  of this
header, see the Lexicon entry for llpp.

llpp also assigned each job a seven-character name.  The first character is RR
or  rr: the  former indicates  that the  job is either  being printed  or is
awaiting  printing; whereas  the  latter indicates  that the  job has  been
printed.  The second character is a digit, from zero to nine, that sets the
job's  priority: zero  gives highest priority,  nine lowest.   (The default
priority is 22.) The  last five characters give a zero-padded identification
number.

llppsscchheedd awakens  every 30 seconds or  whenever the command llpp  spools a job
for printing.  llppsscchheedd  then processes each file in /uussrr/ssppoooolleerr/mmllpp/qquueeuuee.
It reads each job each that  is awaiting printing, the order being dictated
first by  the priority  code and then  by the identification  number (which
indicates the order in which the jobs were spooled).

llppsscchheedd reads the header to see  which printer the job is to be printed on.
It then finds the entry  in file /uussrr/ssppooooll/mmllpp/ccoonnttrroollss to find the device
through which that printer is  accessed, and whether that printer is linked
to  a  configuration script  in  directory  /uussrr/ssppooooll/mmllpp/bbaacckkeenndd. If  the
printer's entry  in ccoonnttrroollss  does name a  script, llppsscchheedd then  opens then
reads it, executes  the commands it contains, and passes  the output to the
appropriate device.   If no script  exists, it passes  the body of  the job
(that is, the text that you had spooled) without modification to the device
by which the  printer is accessed.  llppsscchheedd uses a  system of lock files to
ensure that each device is accessed in a disciplined manner.

You can abort the printing of  a job by invoking the command ccaanncceell. When a
job has  printed successfully, llppsscchheedd changes the  status character in its
name to  rr.  A file remains  in the spool directory  until its ``lifetime''
has  expired.  You  can reprint  a quiescent file  by invoking  the command
rreepprriinntt. To  change a job's target printer, priority,  or lifetime, use the
command cchhrreeqq. For details on these commands, see their Lexicon entries.

Approximately  every  ten  minutes,  llppsscchheedd  reads  the  header  of  every
quiescent file after it has  processed all jobs that are awaiting printing.
If a  file's ``lifetime'' has expired,  llppsscchheedd removes it.  A  file with a
_t_e_m_p_o_r_a_r_y lifetime survives for two hours after spooling; one with a _s_h_o_r_t-
_t_e_r_m  lifetime survives  for 48  hours; and one  with a  _l_o_n_g-_t_e_r_m lifetime
survives for 72  days.  Note that you can change  these defaults by editing
the  file  /uussrr/ssppooooll/mmllpp/ccoonnttrroollss;  for  details,  see  its entry  in  the
Lexicon.  Note, too, that you can change the above default ``lifetimes'' by
editing the file /uussrr/ssppooooll/mmllpp/ccoonnttrroollss.

The  command llppsscchheedd  turns on  llppsscchheedd; and command  llppsshhuutt turns  it off.
Jobs spooled  while llppsscchheedd is  turned off remain spooled  until llppsscchheedd is
reawakened.

_S_e_e _A_l_s_o
AAddmmiinniisstteerriinngg CCOOHHEERREENNTT, ccoommmmaannddss llpp, llppsshhuutt, pprriinntteerr
