Richard L. Hamilton wrote:
>> Yes, it's implemented.  The streamio.c strioctl()
>> implementation is the
>> real one.  The gentty.c module is a red herring.
>>  It's part of the
>> bscure "sy" driver ... which has no man page and
>> dates back to the USL
>> implementation.  I have no idea what it does.  :-/
> 
> At least on Solaris 10 (don't have anything newer
> handy at the moment):
> # modinfo|grep ' sy '
> 190 7b7f5570      59c 22    1  sy (Indirect driver for tty 'sy' 1.)
> # ls -lL /dev/tty
> crw-rw-rw-   1 root     tty       22,  0 Aug 6 11:44 /dev/tty
> 
> In other words, sy implements /dev/tty...and probably
> predates STREAMS-based ttys even.
> 
> (I'm having SVR2 flashbacks, having read a lot of that code
> way back when.  In fact, I think back in even earlier code,
> the sy driver handled something else in addition, maybe
> the console, as another minor device.  But maybe my memory
> is playing tricks on me.)

Ah, ok.

> So I'm presuming that under normal use, the streamio code
> takes care of the TIOCNOTTY ioctl, and it never gets down to
> the sy driver (which by the comments, couldn't safely handle it).

It's not a STREAMS driver (look at the cb_ops), so, no, the streamio
code has nothing to do what that.  If 'sy' is somehow your controlling
terminal, I don't believe that TIOCNOTTY will do what you expect.

But then since /dev/tty is supposed to be a representation of your
controlling tty (which is in turn some other device; see tty(7D)), you'd
have a chicken-and-egg problem in trying to assign /dev/tty _as_ your
controlling tty in the first place.

-- 
James Carlson         42.703N 71.076W         <carls...@workingcode.com>
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to