lprm hangs printer

ables at milano.UUCP ables at milano.UUCP
Tue Mar 25 08:40:18 AEST 1986


> After lprm on an active job lpd was restarted with printer {hostname}
> In our case paisley.
> I added the alias paisley in /etc/printcap and it seemed to work ok.
> Thus:
> 
> lp|paisley|local line printer:\
> 	:lp=/dev/lp:sd=/usr/spool/lpd:lf=/usr/adm/lpd-errs:\
>         :rf=/usr/ucb/fpr:

Well, this will work, but it doesn't really fix the problem, it just
patches the symptom.  The problem is in the code for lprm, he tries
to restart the printer and uses the variable containing the hostname
INSTEAD of the variable containing the printer name.  It's pretty
obvious when you look through the code.  The fix above DOES fix the
problem, though, and if you're not into patching code, and if it
doesn't cause any other problems, it'll do.

The REAL fix, is to /usr/src/usr.lib/lpr/rmjob.c as follows:
92c92
<       if (assasinated && !startdaemon(host))
---
>       if (assasinated && !startdaemon(printer))

-King
ARPA: ables at mcc.arpa
UUCP: {ihnp4,seismo,ctvax}!ut-sally!im4u!milano!mcc-pp!ables



More information about the Comp.bugs.4bsd.ucb-fixes mailing list