Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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