[TUHS] 8th Edition Research Unix on SIMH
norman at oclsc.org
Thu Apr 27 11:04:37 AEST 2017
I'm not sure what fd 3 is intended to be, but its the telnet socket in p9p.
By the 10/e days, file descriptor 3 was /dev/tty. There was
no more magic driver for /dev/tty; the special file still
existed, but it was a link to /dev/fd/3.
Similarly /dev/stdin stdout stderr were links to /dev/fd/0 1 2.
(I mean real links, not mere symbolic ones.)
I have a vague recollection that early on /dev/tty was fd/127
instead, but that changed somewhere in the middle 8/e era.
None of which says what Plan 9 did with that file descriptor,
though I suppose it could possibly have copied the /dev/tty
And none of that excuses the hard-coded magic number file
descriptor, but hackers will be hackers.
More information about the TUHS