O_NDELAY flag on open system call on 4.2BSD

David Melman davem at sdcrdcf.UUCP
Wed Nov 26 09:07:29 AEST 1986


I want to be able to check for carrier on a tty port without blocking.
I thought I would use the O_NDELAY flag in an open call, but I found
that the open still hangs, e.g 

>open (ttyline, O_WRONLY|O_NDELAY, 0);

Specifically, the tty port is a DEC DMZ.  
We are running 4.2bsd with Chris Torek's DMZ driver.

I'm doing this in order to determine whether a LaserJet printer is connect
or not.  It is shared between a our Vax and a micro.
How can I do this?

David Melman
UNISYS 

UUCP: {hplabs,cbosgd,ihnp4}!sdcrdcf!davem



More information about the Comp.unix.questions mailing list