delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/10/15/23:39:23

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-Id: <5.1.0.14.2.20021015203306.02bd09a8@pop3.cris.com>
X-Sender: rrschulz AT pop3 DOT cris DOT com
Date: Tue, 15 Oct 2002 20:40:05 -0700
To: cygwin AT cygwin DOT com
From: Randall R Schulz <rrschulz AT cris DOT com>
Subject: Re: problem with "more" under cygwin-1.3.13-1
In-Reply-To: <F1776LIu0CRVjbHA1I3000001b3@hotmail.com>
Mime-Version: 1.0

John,

How does that scheme of opening initial tty descriptors "save a variable?"

By the way, "init" didn't open the descriptors, "getty" did. Those 
descriptors were then inherited by "login" and thence by the user's shell. 
Apart from reading "/etc/inittab" (I think that's what it was called) and 
occasionally writing diagnostics to the system console, init doesn't open 
many files. It mostly just does process handling.

Randall Schulz
Mountain View, CA USA


At 20:28 2002-10-15, John Vincent wrote:
>Hi,
>
>Reading from 2 (standard error) is "a little iffy", but back in days of 
>yore, when Unix was either BSD or version 7, it was quite common. The 
>standard behaviour was to open fd 0 (input) with mode 0 (read), fd 1 
>(output) with mode 1 (write) and fd 2 (error) with mode 2 (read&write). 
>The logic was that this saved a variable in the init process that started 
>the login on the ttys. Memory was expensive back then...
>
>Just a little history lesson for the interested ....
>
>/John VIncent


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019