> From [EMAIL PROTECTED] Tue Apr 23 07:20:50 2002
> Date: Tue, 23 Apr 2002 14:32:12 +0100 (BST)
> From: Toby Blake <[EMAIL PROTECTED]>
> Subject: LPRng: LPRng-3.8.10 hanging when using program as filter or printcap_path
> To: [EMAIL PROTECTED]
>
> Hi,
>
> I'm experiencing a problem running LPRng-3.8.10 under RH Linux 7.1
> when trying to use perl programs either to provide printcap
> information or acting as a filter.  This worked OK under 3.7.4.  What
> happens is that the program seems to hang when attempting to read data
> from STDIN. In standalone testing the programs work OK, it's only when
> using them with LPRng that the problem arises.
>
> I rewrote the printcap query program so that it would accept the
> printer name from -P rather than on STDIN.  However, for the filter
> program this option isn't available to me.
>
> Here's the relevant bit of the program:
>
> print STDERR "**** about to read from STDIN\n";
> read STDIN, $magic, 80;
> print STDERR "**** finished reading from STDIN\n";
>
> ... and here's the bit from the status file:
>
> IF filter 'psif' filter msg - '**** about to read from STDIN' at 
>2002-04-23-11:06:30.159 ## A=toby@host1+545 number=545 process=20547
> waiting for subserver to exit at 2002-04-23-13:13:52.310 ## A=<NULL> number=0 
>process=21774
>
> ... and it hangs indefinitely here (with additional 'waiting for
> subserver to exit' messages very 10 minutes).
>
> However, if I go back to using LPRng-3.7.4 and don't change anything
> at all, this all works perfectly.
>
> Thanks for any help
> Toby

I have put stuff into a script:


lp
:af=acct
:filter=/tmp/getstuff
:lf=/var/log/%P
:mx=0
:sd=/var/spool/lpd/%P
:lp=h14%9100
:lp=h31%9100

Here is /tmp/getstuff:

#!/usr/bin/perl
print STDERR "starting\n";
read STDIN, $magic, 80;
print STDERR "done\n";
exit 0

And I did:
 lpc reread
 echo hi |lpr

And I have status:

Printer: lp@h110
 Queue: no printable jobs in queue
 Status: waiting for subserver to exit at 18:41:20.686
 Status: subserver pid 86656 starting at 18:41:20.688
 Status: accounting at start at 18:41:20.688
 Status: opening device 'h31%9100' at 18:41:20.688
 Status: printing job 'root@h110+654' at 18:41:20.692
 Status: processing 'dfA654h110.private', size 3, format 'f', IF filter 'getstuff' at 
18:41:20.692
 Status: IF filter 'getstuff' filter msg - 'starting' at 18:41:20.698
 Status: IF filter 'getstuff' filter msg - 'done' at 18:41:20.698
 Status: IF filter 'getstuff' filter finished at 18:41:20.699
 Status: printing finished at 18:41:20.699
 Status: accounting at end at 18:41:20.702
 Status: finished 'root@h110+654', status 'JSUCC' at 18:41:20.702
 Status: subserver pid 86656 exit status 'JSUCC' at 18:41:20.703
 Status: [EMAIL PROTECTED]: job 'root@h110+654' printed at 18:41:20.703
 Status: job 'root@h110+654' saved at 18:41:20.703
 Status: job 'root@h110+654' removed at 18:41:22.478

So I am a bit puzzled.

Patrick Powell                 Astart Technologies,
[EMAIL PROTECTED]            9475 Chesapeake Drive, Suite D,
Network and System             San Diego, CA 92123
  Consulting                   858-874-6543 FAX 858-279-8424 
LPRng - Print Spooler (http://www.lprng.com)

-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------

Reply via email to