The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: arnold@skeeve.com
To: pnr@planet.nl, arnold@skeeve.com
Cc: tuhs@minnie.tuhs.org
Subject: Re: [TUHS] 8th Edition and /dev/stdio
Date: Mon, 20 Apr 2020 09:16:43 -0600	[thread overview]
Message-ID: <202004201516.03KFGhPd001645@freefriends.org> (raw)
In-Reply-To: <D0EB9CF4-333A-43D1-9DA1-06DFF87CCD5D@planet.nl>

Glad to have helped. Maybe later systems did the symlink.  I'm pretty sure SVR4 and later Linux did
it with symlinks.

SVR4 went overboard - /dev/fd was a separate file system type!

Arnold

Paul Ruizendaal <pnr@planet.nl> wrote:

> Thanks for that!
>
> Indeed they are on the /dev/fd man page of 8th Edition.
>
> I’m thrilled that https://unix50.org is back up and could quickly check. They are not symlinks, but character special files (with the same major/minor, of course). In the /dev/fd directory all 128 possible device entries were added.
>
> It certainly suggests that a virtual /dev directory (like /proc) would have been useful.
>
> >> Who added this neat little innovation?
>
> Googling for /dev/fd also answered my other question: http://poincare.matf.bg.ac.rs/~ivana/courses/ps/sistemi_knjige/pomocno/apue/APUE/0201433079/ch03lev1sec16.html
>
> "The /dev/fd feature was developed by Tom Duff and appeared in the 8th Edition of the Research UNIX System.”
>
>
>
> > On 20 Apr 2020, at 16:28, arnold@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.
> > 
> > HTH,
> > 
> > Arnold
> > 
> > Paul Ruizendaal <pnr@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?ln=174,187
> >> 
> >> 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?
> >> 
> >> 
>

  reply	other threads:[~2020-04-20 15:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20 13:59 Paul Ruizendaal
2020-04-20 14:28 ` arnold
2020-04-20 15:01   ` Paul Ruizendaal
2020-04-20 15:16     ` arnold [this message]
2020-04-20 17:58       ` Paul Ruizendaal
2020-04-20 18:17   ` Derek Fawcus
2020-04-20 18:32     ` arnold
2020-04-22  9:21       ` Rob Pike
2020-04-22  9:33         ` arnold
2020-04-22  9:35           ` Steve Nickolas
2020-04-22  9:41             ` Rob Pike

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202004201516.03KFGhPd001645@freefriends.org \
    --to=arnold@skeeve.com \
    --cc=pnr@planet.nl \
    --cc=tuhs@minnie.tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).