From: joan codina <100555.2741@CompuServe.COM>
Subject: Accessing directly to printer port
Date: 1998/04/21 [thread overview]
Message-ID: <#T5Sc6Ob9GA.325@nih2naac.prod2.compuserve.com> (raw)
I wnat to use a parallel printer on an alpha server. I need
the printer as a system logger and must be printing all events
happening in our system. I have two ways of performing it:
Generating a new file for each line and sending it to the spooler.
Or opening directly the file /dev/lp0 wich seems to run, with
some problems:
When there is too much trhoughput for the printer, or the printer
is off-line (out of paper for example) then the write function
blocks my program ( which is undesirable, I prefer to loose data)
There is no way to know the status of the printer? or if the
file buffer is becoming full?.
I have tried the ioctl function but it gives me the error that
the device is not available (even that it is open an printing)
I have also tried de aio_write function, but after some writes
(about 350) the call gives an "operation would block" error
after this error the printer is not able to print any more, even
if I close the file and re-open it
If you could help me ...
Thanks
Joan Codina
Please send answers to the news or to this e-mail Jcodina@eum.es
reply other threads:[~1998-04-21 4:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox