Don't flush my queue!
Karl Denninger
karl at ddsw1.MCS.COM
Thu Feb 8 02:18:06 AEST 1990
In article <15030007 at hpfijdw.HP.COM> jdw at 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 at ddsw1.MCS.COM, <well-connected>!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"
More information about the Comp.unix.xenix
mailing list