Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Apr 1998 09:34:44 +1200 (NZST)
From:      Jonathan Chen <jonc@pinnacle.co.nz>
To:        Robert Beer <r-beer@onu.edu>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: 2.2.5 Printing Problem
Message-ID:  <Pine.SGI.3.96.980423093141.8966A-100000@tui.pinnacle.co.nz>
In-Reply-To: <l0310280bb161586e968d@[140.228.15.35]>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 22 Apr 1998, Robert Beer wrote:

> A user is trying to print a large Postscript file to a JetDirect remote
> queue from a 2.2.5R system with the lpd patch installed.  The file just
> stops printing and lpq gives this error:
> 
> 	HostName: Warning: no daemon present
> 
> I have been able to print the file after raising the ct value.  In watching
> with tcpdump during a test with a lower ct value printing stopped very
> close to that time.  Data was continuously sent until the ct time was
> execeeded.  Any suggestions?

Did you apply that patch which Joerg submitted?
--
Jonathan Chen <jonc@pinnacle.co.nz>                 Once is dumb luck.
                                                 Twice is coincidence.
             Three times and Somebody Is Trying To Tell You Something.

--------------------forwarded mail-----------------------------------
When merging the new `ct' printcap functionality into 2.2-stable right
before 2.2.5-RELEASE was due, it's now apparent that I didn't test it
enough before. :-(  I've introduced a fatal bug that causes all the
lpd children sending jobs to remote printers to be killed after the `ct'
timeout, even in case the connection came up properly.  For small jobs,
you won't notice this immediately (the default timeout is 120 seconds,
and modern printers can print a lot within this time), but large jobs
will ultimately be aborted then.

Sorry for the inconvenience.  For those of you who do need to operate
on remote printers, please either do upgrade to the latest 2.2-stable,
or apply the patch below, rebuild and reinstall your lpd.

Sorry again,

	Joerg <joerg@FreeBSD.ORG>

Index: src/usr.sbin/lpr/common_source/displayq.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/lpr/common_source/displayq.c,v
retrieving revision 1.4.2.5
retrieving revision 1.4.2.6
diff -u -u -r1.4.2.5 -r1.4.2.6
--- displayq.c	1997/10/15 12:25:35	1.4.2.5
+++ displayq.c	1997/11/07 13:20:29	1.4.2.6
@@ -242,6 +242,7 @@
 	savealrm = signal(SIGALRM, alarmhandler);
 	alarm(CT);
 	fd = getport(RM, 0);
+	alarm(0);
 	(void)signal(SIGALRM, savealrm);
 	if (fd < 0) {
 		if (from != host)
Index: src/usr.sbin/lpr/lpd/printjob.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/lpr/lpd/printjob.c,v
retrieving revision 1.11.2.3
retrieving revision 1.11.2.4
diff -u -u -r1.11.2.3 -r1.11.2.4
--- printjob.c	1997/10/15 09:56:00	1.11.2.3
+++ printjob.c	1997/11/07 13:20:37	1.11.2.4
@@ -1474,6 +1474,7 @@
 		savealrm = signal(SIGALRM, alarmhandler);
 		alarm(CT);
 		pfd = getport(cp, port);
+		alarm(0);
 		(void)signal(SIGALRM, savealrm);
 		if (pfd < 0 && errno == ECONNREFUSED)
 			resp = 1;
@@ -1541,6 +1542,7 @@
 		savealrm = signal(SIGALRM, alarmhandler);
 		alarm(CT);
 		pfd = getport(RM, 0);
+		alarm(0);
 		(void)signal(SIGALRM, savealrm);
 		if (pfd >= 0) {
 			(void) snprintf(line, sizeof(line), "\2%s\n", RP);



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SGI.3.96.980423093141.8966A-100000>