[TUHS] FD 2

arnold at skeeve.com arnold at skeeve.com
Mon Jan 30 17:50:26 AEST 2023


> > 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


More information about the TUHS mailing list