delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2002/01/29/01:57:16

Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT cygwin DOT com>
List-Help: <mailto:cygwin-developers-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT cygwin DOT com
Delivered-To: mailing list cygwin-developers AT cygwin DOT com
Date: Tue, 29 Jan 2002 01:56:27 -0500
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin-developers AT cygwin DOT com
Subject: Re: fork() idea
Message-ID: <20020129065627.GA30010@redhat.com>
Reply-To: cygwin-developers AT cygwin DOT com
Mail-Followup-To: cygwin-developers AT cygwin DOT com
References: <04ce01c1a72e$2c597940$0200a8c0 AT lifelesswks> <NCBBIHCHBLCMLBLOBONKOEMNCJAA DOT g DOT r DOT vansickle AT worldnet DOT att DOT net>
Mime-Version: 1.0
In-Reply-To: <NCBBIHCHBLCMLBLOBONKOEMNCJAA.g.r.vansickle@worldnet.att.net>
User-Agent: Mutt/1.3.23.1i

On Tue, Jan 29, 2002 at 12:53:10AM -0600, Gary R. Van Sickle wrote:
>What about avoiding fork() entirely?  I'm of course not talking about a general
>solution, but take sh for example; would it be possible to write a shell that
>simply never forks (or has it already been done)?  That alone would be a massive
>win.  Seems that one could simply (he sez) maintain a state stack where each
>time you see a "var=$(echo something | somethingelse)", instead of forking you'd
>just push a new shell state on the stack, spawn the commands, do the piping and
>other shell-things in the same process, pop the stack and Bob's yer uncle, no
>fork overhead.
>
>Or am I missing something fundamental?

This is pretty much what ash + cygwni + vfork do now, more or less.

cgf

- Raw text -


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