* Accessing directly to printer port
@ 1998-04-21 4:00 joan codina
0 siblings, 0 replies; only message in thread
From: joan codina @ 1998-04-21 4:00 UTC (permalink / 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1998-04-21 4:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-04-21 4:00 Accessing directly to printer port joan codina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox