> From [EMAIL PROTECTED] Thu Apr 25 09:57:13 2002
> Date: Thu, 25 Apr 2002 16:55:10 +0100 (BST)
> From: Toby Blake <[EMAIL PROTECTED]>
> Subject: LPRng: Re: LPRng-3.8.10 hanging when using program as filter or
>printcap_path
> To: [EMAIL PROTECTED]
>
> > host1: cat /tmp/getstuff
> > #!/usr/bin/perl
> >
> > print STDERR "starting\n";
> > read STDIN, $magic, 80;
> > print STDERR "done\n";
> > exit 0
>
> OK, I've been looking into this in a bit more detail, using the above
> program as the :if filter.
>
> I've traced through this with gdb and it hangs in Read_fd_len_timeout
> (line 219 in utilities.c), which is called by this line in printjob.c
> (line 987):
>
> count = Read_fd_len_timeout( left, of_error, msg+msglen, msgmax-msglen
> );
>
> The first time it encounters this line it successfully reads
> "starting\n" from the filter. However, the second time, the read call
> in Read_fd_len_timeout just hangs:
>
> (gdb) s
> Read_fd_len_timeout (timeout=6000, fd=7, msg=0xbfffb9a0 "", len=511)
> at ./common/utilities.c:222
> 222 if( timeout > 0 ){
> (gdb) n
> 223 if( Set_timeout() ){
> (gdb) n
> 224 Set_timeout_alarm( timeout );
> (gdb) n
> 225 i = read( fd, msg, len );
> (gdb) p fd
> $10 = 7
> (gdb) p msg
> $11 = 0xbfffb9a0 ""
> (gdb) p len
> $12 = 511
> (gdb) s
>
> Any ideas as to why this could be happening? Is there any more
> debugging information that would be useful?
>
> Thanks
> Toby
This is a bit involved, but bear with me.
The 'Set_timeout()' function is actually a hideous macro
that sets a longjump. The Set_timeout_alarm() code
sets an alarms with a signal handler that is supposed to terminate
the read.
This termination does not seem to be happening. I suspect we are
into the joys of OS dependencies.
Can you call me on the phone on this one?
Patrick
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.
-----------------------------------------------------------------------------