From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8c9b,102694a5befbd0ae,start X-Google-Attributes: gidf8c9b,public X-Google-Thread: fee84,102694a5befbd0ae,start X-Google-Attributes: gidfee84,public X-Google-Thread: 10650a,102694a5befbd0ae,start X-Google-Attributes: gid10650a,public X-Google-Thread: f678f,102694a5befbd0ae,start X-Google-Attributes: gidf678f,public From: joan codina <100555.2741@CompuServe.COM> Subject: Accessing directly to printer port Date: 1998/04/21 Message-ID: <#T5Sc6Ob9GA.325@nih2naac.prod2.compuserve.com>#1/1 X-Deja-AN: 346413283 Organization: Sainco trafico Newsgroups: comp.unix.internals,comp.unix.osf.misc,comp.unix.osf.osf1,comp.unix.questions 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