Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!rutgers!ispi!jbayer From: jbayer@ispi.COM (Jonathan Bayer) Newsgroups: comp.unix.xenix Subject: Re: Serial Printer Problem (fixing the scheduler problem) Message-ID: <1650@ispi.COM> Date: 20 Jul 90 11:50:09 GMT References: <2070@lakesys.lakesys.com> <1990Jul19.112309.5174@eddie.mit.edu> Organization: Intelligent Software Products, Inc. Lines: 56 aryeh@eddie.mit.edu (Aryeh M. Weiss) writes: >In article <2070@lakesys.lakesys.com> davef@lakesys.UUCP (Dave Fenske) writes: >>Has anyone ever encountered a Xenix problem in which the print spooler >>hangs when a print job is cancelled. This occurs on a serial port, BTW. >> >Yes, this seems to happen when you cancel the job at the top of the queue >(the job that is currently printing). Canceling a job lower down on the >queue works okay. Usually the result is `lpsched' dies leaving some >child processes behind. Starting the >scheduler up again then usually fixes the problem. I ended up writing a fake >`lp' that would check to see if the scheduler was running and respawn it >if not, then call the real `lp'. >However, other times lpsched truely hangs (its running but not doing >anything). Sometimes even killing it off and restarting it doesn't do >any good! Lpsched just sits there with a dozen jobs on the queue with >the printer idle! I have to reboot! I think that lpsched must use >some obscure system resource which the system runs out of, but there >is nothing I can think of that would cause this behavior. Time to find >a good PD lp package. >-- No. There is a race condition in the scheduler. It can be fixed as follows: 1. Create a new printer, call it dummy 2. Make this new printer the system default printer 3. In the file /etc/profile add the following line: LPDEST=printer; export LPDEST Replace "printer" with what you normally use as your default printer. To restart the scheduler working properly, perform the following steps: 1. Type: /usr/lib/lpshut to shut the scheduler 2. Type: ps -ae | grep lp to get the pids of all children of the scheduler. 3. kill all the children using a kill -9 4. Remove the files (if they exist): /usr/spool/lp/FIFO /usr/spool/lp/SCHEDLOCK /usr/spool/lpd/* 5. Restart the scheduler by typing: /usr/lib/lpsched JB -- Jonathan Bayer Intelligent Software Products, Inc. (201) 245-5922 500 Oakwood Ave. jbayer@ispi.COM Roselle Park, NJ 07204