lprm cannot restart printer daemon (4.2)

morgan at UCI-750A.ARPA morgan at UCI-750A.ARPA
Tue Aug 7 13:59:58 AEST 1984


From:  Tim Morgan <morgan at UCI-750A.ARPA>

Description:
	When you use lprm to remove a file from a printer queue,
	if that job is the currently active job for that queue,
	the daemon is killed to stop it from printing the job.
	The job is then dequeued, and lprm attempts to restart
	the queue.  But it always fails with the message

		/usr/lib/lpd: <host>: unknown printer

Repeat-By:
	Try removing the active job with lprm.

Fix:
	The call to startdaemon() in rmjob.c is passed the host name
	instead of the name of the printer whose daemon is to be
	restarted.

*** ucb_rmjob.c	Sun Jul 17 00:12:55 1983
--- fixed_rmjob.c	Mon Aug  6 20:34:25 1984
***************
*** 89,95
  	/*
  	 * Restart the printer daemon if it was killed
  	 */
! 	if (assasinated && !startdaemon(host))
  		fatal("cannot restart printer daemon\n");
  	exit(0);
  }

--- 89,95 -----
  	/*
  	 * Restart the printer daemon if it was killed
  	 */
! 	if (assasinated && !startdaemon(printer))
  		fatal("cannot restart printer daemon\n");
  	exit(0);
  }



More information about the Comp.unix.wizards mailing list