[comp.unix.internals] opening tty devices with getty attached

coleman@cam.nist.gov (Sean Sheridan Coleman X5672) (01/29/91)

I want to first thank Guy Harris for all of his help he has
given me concerning these tty devices. 

I need just a little bit more info ( I hope) to figure all 
of this out.

The manual states that open will block when opening a device
that is a communication device with no carrier. I confirmed
that this works. It also states that when O_NDELAY is set,
the open will not block. 

I also confirmed this. QUESTION: Does the open suppose to succeed?
My open did with no carrier and O_NDELAY.

Now for the confusion. With login ( ie getty engaged) turned on`
in /etc/ttytab, the open will block with O_NDELAY set. Reading
through the man pages for the zs devices, I got the idea it was
suppose to, but I want some confirmation because the man pages
are not clear about this point. If it is suppose to hang, has
getty done something to make this happen?


Thanks

Sean Coleman
coleman@bldrdoc.gov

rock@cbnews.att.com (Y. Rock Lee) (02/05/91)

In article <6853@alpha.cam.nist.gov> coleman@cam.nist.gov (Sean Sheridan Coleman X5672) writes:
>
>Now for the confusion. With login ( ie getty engaged) turned on`
>in /etc/ttytab, the open will block with O_NDELAY set. Reading
>through the man pages for the zs devices, I got the idea it was
>suppose to, but I want some confirmation because the man pages
>are not clear about this point. If it is suppose to hang, has
>getty done something to make this happen?

Yes, it is supposed to hang because the standard line discipline
used by the character tty driver doesn't support O_NDELAY.
On the other hand, O_NDELAY is supported by the streamhead in SVR4.


Y. Rock Lee, att!cblph!rock
             rock@cblph.ATT.COM