[comp.os.minix] stty

allbery@ncoast.UUCP (06/21/87)

As quoted from <549@ubu.warwick.UUCP> by ham@warwick.UUCP (Hot Air Machine Project):
+---------------
| ....And the bugfix.  stty.c performs its ioctl()s on file descriptor 0 (stdin)
| this means that to change the settings on terminals other than the one you
| are using, you have to type e.g: stty -echo < /dev/tty1
| which is rather counter-intuitive, not to mention different to UNIX.  The
| solution is to replace all occurences of "ioctl(0," by "ioctl(1," in stty.c --
| I think there are four of them.
+---------------

V7 stty did do it this way, doing ioctls to fd 0 and printing output to fd 1.
Later versions moved ioctls to fd 1 and printed output on fd 2.  (I'm using a
truly ancient Unisoft 68000 V7 on an abandoned Pixel right now; if I knew how
to program in TMS9900 machine language I might try to bring up Minix on this
beast.  (All I/O including console I/O goes through the TMS9900.)

++Brandon
-- 
Copyright (C) 1987 Brandon S. Allbery.  Redistribution permitted only if the
    redistributor permits further redistribution.  (Stargate take heed!)
     ---- Moderator for comp.sources.misc and comp.binaries.ibm.pc ----
Brandon S. Allbery	{decvax,cbosgd}!cwruecmp!ncoast!allbery
aXcess Company		{ames,mit-eddie,talcott}!necntc!ncoast!allbery
6615 Center St. #A1-105	necntc!ncoast!allbery@harvard.HARVARD.EDU
Mentor, OH 44060-4101	+01 216 974 9210	(also eddie.MIT.EDU)

henry@utzoo.UUCP (Henry Spencer) (06/24/87)

> V7 stty did do it this way, doing ioctls to fd 0 and printing output to
> fd 1.  Later versions moved ioctls to fd 1 and printed output on fd 2...

Sorry to contradict you, Brandon, but the original V7 stty does ioctls on
fd 1 and prints output on fd 2.  That's the way it came on the original V7
pdp11 tapes straight from Bell Labs.  To be doubly sure, I checked my
Seventh Edition manual, which was physically obtained from Bell.  1 and 2.
-- 
"There is only one spacefaring        Henry Spencer @ U of Toronto Zoology
nation on Earth today, comrade."   {allegra,ihnp4,decvax,pyramid}!utzoo!henry