Writing to the parallel port in
SCO UNIX 3.2.4
We have written a printer spooler that is able to detect printer problems
by setting an alarm() prior to a putc() call, our problem is that when we
are talking to /dev/lp0 and there is some reason why the read times out a
signal would be expected as occurrs with the serial ports but the process
just locks up until the putc() is able to write to lp0 (ie. they plug the
printer back in again), in this case the signal goes off after the putc()
unblocks.
Why is it that the signal/alarm soloution works on serial ports but not a
parallel port? Is there any way that I should be checking that the write
will not block prior to writing? I need to know which characters don't go
to the printer so that when the operator resumes the print it'll continue
from where it left off.
Thanks in advance
Rob
--
Robert Tillyard AT Veterinary Systems Ltd.,
+44 359-258411 Bury St Edmunds, Suffolk, IP31 3HA. UK.