From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 14150 invoked from network); 20 Apr 2020 15:17:08 -0000 Received-SPF: pass (minnie.tuhs.org: domain of minnie.tuhs.org designates 45.79.103.53 as permitted sender) receiver=inbox.vuxu.org; client-ip=45.79.103.53 envelope-from= Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with UTF8ESMTPZ; 20 Apr 2020 15:17:08 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 0E01F9B931; Tue, 21 Apr 2020 01:17:07 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 996179B934; Tue, 21 Apr 2020 01:16:50 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id 5A0A99B934; Tue, 21 Apr 2020 01:16:48 +1000 (AEST) Received: from freefriends.org (freefriends.org [96.88.95.60]) by minnie.tuhs.org (Postfix) with ESMTPS id 342309B931 for ; Tue, 21 Apr 2020 01:16:47 +1000 (AEST) X-Envelope-From: arnold@skeeve.com Received: from freefriends.org (freefriends.org [96.88.95.60]) by freefriends.org (8.14.7/8.14.7) with ESMTP id 03KFGhiP001646 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Apr 2020 09:16:43 -0600 Received: (from arnold@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 03KFGhPd001645; Mon, 20 Apr 2020 09:16:43 -0600 From: arnold@skeeve.com Message-Id: <202004201516.03KFGhPd001645@freefriends.org> X-Authentication-Warning: frenzy.freefriends.org: arnold set sender to arnold@skeeve.com using -f Date: Mon, 20 Apr 2020 09:16:43 -0600 To: pnr@planet.nl, arnold@skeeve.com References: <46EFF8FB-86D2-407A-87A7-B7A58D47C2D9@planet.nl> <202004201428.03KESrgI032002@freefriends.org> In-Reply-To: User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [TUHS] 8th Edition and /dev/stdio X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tuhs@minnie.tuhs.org Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" 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 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 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? > >> > >> >