Date: Mon, 11 Sep 1995 10:57:58 +1000 From: Stephen Hocking <sysseh@devetir.qld.gov.au> To: bugs@freebsd.org Subject: lpd does not correctly detect when ofilter is finished Message-ID: <199509110058.AAA07500@netfl15a.devetir.qld.gov.au>
next in thread | raw e-mail | index | archive | help
>Submitter-Id: current-users >Originator: Bourne-again Superuser >Organization: >Confidential: yes >Synopsis: lpd does not always correctly detect when an output filter is done >Severity: non-critical >Priority: medium >Category: bin >Release: FreeBSD 2.2-CURRENT i386 >Class: sw-bug >Environment: FreeBSD-current, running lpd subsystem >Description: Lpd does not always correctly detect when an output filter has finished processing. If the output filter reads all of the data before starting to print it (as it must do in some cases) lpd incorrectly decides that the job has finished printing and starts a new job. >How-To-Repeat: Create a filter that reads all of the data before starting to print. Send heaps of jobs to that printer. Watch the queue empty in double-quick time. See disaster ensue at the print device as jobs interleave their output. >Fix: *** printjob.c.dist Fri Sep 8 14:21:53 1995 - --- printjob.c Fri Sep 8 14:23:54 1995 *************** *** 272,277 **** - --- 272,279 ---- (void) write(ofd, TR, strlen(TR)); } (void) unlink(tempfile); + close(ofd); /* give ofilter an EOF indicator */ + (void)wait((int *)0); /* wait until ofilter finished */ exit(0); } goto again; I do not speak for the Worker's Compensation Board of Queensland - They don't pay me enough for that!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509110058.AAA07500>