Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!asuvax!mcdphx!mcdchg!ddsw1!karl From: karl@ddsw1.MCS.COM (Karl Denninger) Newsgroups: comp.unix.xenix Subject: Re: Don't flush my queue! Summary: Common problem Message-ID: <1990Feb7.151806.3069@ddsw1.MCS.COM> Date: 7 Feb 90 15:18:06 GMT References: <15030007@hpfijdw.HP.COM> Reply-To: karl@mcs.MCS.COM (Karl Denninger) Organization: Macro Computer Solutions, Inc. - Mundelein, IL Lines: 37 In article <15030007@hpfijdw.HP.COM> jdw@hpfijdw.HP.COM (Jeff Wood) writes: > >I am having trouble with the printer spooler using Xenix 2.3.3. >When I send a request to the printer, everything works fine and >the file is printed correctly. If I queue up more than one file, >all files are sent to the printer at once, and the printer pukes. > >I am using a serial printer with a call to stty in the interface >script as follows: > > stty ocrnl ixon ixoff clocal 0<&1 > >Communication seems to be ok for one file at a time, but sending >more than one flushes all requests in the queue to the printer. >I have tried several different serial printers, and it seems to >do the same on all. > >Am I doing something wrong??? Duplicate that line as the LAST line of the interface script, right before the "exit 0". The problem will disappear. The problem is that the spooler closes the port before your output drains, and most cards will discard "unused" output when that happens. The "stty" command causes the script to pause until the output has drained. You could also write a 5-10 line "C" program that waited for output to drain (with TCGETA/TCSETAW ioctls) and do the same thing, but the one-line command is simpler. -- Karl Denninger (karl@ddsw1.MCS.COM, !ddsw1!karl) Public Access Data Line: [+1 708 566-8911], Voice: [+1 708 566-8910] Macro Computer Solutions, Inc. "Quality Solutions at a Fair Price"