[TUHS] 8th Edition and /dev/stdio

arnold at skeeve.com arnold at skeeve.com
Tue Apr 21 04:32:32 AEST 2020


Derek Fawcus <dfawcus+lists-tuhs at employees.org> wrote:

> On Mon, Apr 20, 2020 at 08:28:53AM -0600, arnold at skeeve.com wrote:
> > See if there are man pages for /dev/fd/XXX.  IIRC /dev/stdin was
> > a symlink to /dev/fd/0, /dev/stdout to /dev/fd/1, /dev/stderr to /dev/fd/2,
> > and, as a really nice generalization, /dev/tty to /dev/fd/4.  For the
> > latter, init(1) simply dup'ed the opened tty file descriptor one more
> > time before exec-ing login.
>
> So what happened to /dev/fd/3 ?
>
> DF

My bad. I meant /dev/fd/3.  What was cute was that /dev/tty was
no longer a special device of it's own, but just another inherited
open file descriptor.  

Sadly, that generalization never made it out into other *nix systems.

Arnold


More information about the TUHS mailing list