Mr. Johan Claesson gets the 'I Knew That' badge with the
Raspberry Decoration.
I think I added a 'killpg()' call as well as a 'kill()' call
just for this reason in a later release. Silly of me not to
think of this...
Patrick ("I knew that!") Powell
> From [EMAIL PROTECTED] Mon Nov 13 11:38:20 2000
> Date: Mon, 13 Nov 2000 19:28:04 +0100
> From: Johan Claesson <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: LPRng: lprm with printer off
>
> Dmitri Pogosyan wrote:
> >
> > Sorry I wrote about this problem back in summer,
> > but did not have time to investigate then.
> > Now I want to get it working.
> >
> > I have just a local printer on the parallel port run via gs and
> > RH type /var/spool/lpd/lp/filter rather than ifhp.
> >
> > Now I launch the job while printer is off.
> > Five processes are started
> > > ps -ef
> > daemon 26891 16442 0 23:48 ? 00:00:00 lpd (Server) 'lp'
> > daemon 26892 26891 0 23:48 ? 00:00:00 lpd (Worker - Print)
> > 'lp'
> > daemon 26896 26892 0 23:48 ? 00:00:00 bash
> > /var/spool/lpd/lp/filter -A
> > daemon 26918 26896 0 23:48 ? 00:00:00 sh
> > /usr/lib/rhs/rhs-printfilters
> > daemon 26920 26918 11 23:48 ? 00:00:01 gs -q @stc600pl.upp
> > -sPAPERSIZE=
> >
> > and the state of the queue is
> > > lpq
> > Printer: lp@polarbear '360x360'
> > Queue: 1 printable job
> > Server: pid 26735 active
> > Unspooler: pid 26736 active
> > Status: processing 'dfA733polarbear.homenet', size 1302, format 'f', IF
> > filter 'filter' at 22:56:04.510
> > Filter_status: lp is ready and printing
> > Rank Owner/ID Class Job Files Size
> > Time
> > active dima@polarbear+733 A 733 page.ps 1302
> > 22:56:04
> >
> > Now I want to remove the job from the queue while printer is off
> > > lprm 733
> >
> > and I see that the first two (lpd) processes are killed, while the
> > rest are orphaned and
> > are hanging indefinetely (and will produce some garbage if printer is
> > switched on)
> > > ps -ef
> > daemon 26896 1 0 23:48 ? 00:00:00 bash
> > /var/spool/lpd/lp/filter -A
> > daemon 26918 26896 0 23:48 ? 00:00:00 sh
> > /usr/lib/rhs/rhs-printfilters
> > daemon 26920 26918 11 23:48 ? 00:00:01 gs -q @stc600pl.upp
> > -sPAPERSIZE=
> >
> > Queue status is
> > > lpq
> > Printer: lp@polarbear '360x360'
> > Queue: no printable jobs in queue
> > Status: removing job '<NULL>' - ABORT at 22:59:33.030
> > Filter_status: lp is ready and printing
> >
> > ---------------------------------------------
> > Did anybody have the same experience and knows the remedy ?
> > Which signal to what process lprm sends ?
>
> Hi,
>
> I spotted the same problem.
> When you run lprm, the lpd process will send a kill -INT,
> in other words "interrupt signal" which most processes usally ignores.
> Since the first process, the parent (bash), (will) ignore this signal,
> the children (sh & gs) won't get the signal at all.
> This is goes for LPRng-3.6.12, a more recent version of
> LPRng might be different?
>
> You'll need to add some signal handling to your script
> to catch the INT-signal and send a TERM signal instead,
> or kill the children in some other manner.
>
> I've written a perl script to handle this.
> I can send you a copy if you want?
>
>
> BR /Johan Claesson
> --
> Ericsson Network Core Products
> Unix Systems Management [EMAIL PROTECTED]
> Box 1505 Phone: +46 8 727 30 95
> S-125 25 �LVSJ�, Sweden Fax: +46 8 647 82 76
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------