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.
HTH,
Arnold
Paul Ruizendaal <pnr(a)planet.nl> wrote:
Whilst spelunking in the V8 source code I came across
this dozen lines:
http://chiselapp.com/user/pnr/repository/v8unix/artifact/2782d26fa2930724?l…
It implements the /dev/stdin, /dev/stdout and /dev/stderr devices (the variable ‘file_no’
in above code snippet is the constant 40, which is the major number of these devices). It
would seem that this handful of lines could have been in Unix as early as 4th Edition —
but they weren’t. Maybe it was not seen as useful.
As far as I can tell this bit of code originates in 8th Edition, with no earlier
precursors. It does not seem to be in its man pages.
Who added this neat little innovation?