In Plan 9 we made /dev/tty (there called /dev/cons) fully virtual, a fiction that provided the semantics. I agree that it's a pity the /dev/tty kludge persists as a kernel hack.

And then we have pttys, speaking of pitys.

-rob


On Mon, Jan 30, 2023 at 6:50 PM <arnold@skeeve.com> wrote:
> > Where this is done is, as I posted earlier, in /etc/init.    Init opens the
> > tty device and dups it to 1 and then invokes either the shell (if we're in
> > single user mode) or getty for interactive mode.
> > This was done in V6 and PWB (1).   In V7, init added a second dup for file
> > descriptor 2.

What I really like is how in V8 - V10 /dev/tty was a (sym)link to /dev/fd/3,
and init simply did one more dup call. That eliminated the special tty device
driver and was a lovely generalization / simplification.  It's too bad this
was never picked in the commercial Unixes or in Linux.

Arnold