delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/01/31/02:30:32

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
Date: Mon, 31 Jan 2005 08:30:08 +0100
From: Stepan Kasal <kasal AT ucw DOT cz>
To: autoconf-patches AT gnu DOT org
Cc: cygwin AT cygwin DOT com
Subject: Re: _AS_DETECT_BETTER_SHELL speedup
Message-ID: <20050131073008.GD10602@matsrv.math.cas.cz>
Mail-Followup-To: autoconf-patches AT gnu DOT org, cygwin AT cygwin DOT com
References: <87k6pydbfw DOT fsf AT penguin DOT cs DOT ucla DOT edu> <20050127174957 DOT GC12120 AT iam DOT uni-bonn DOT de> <87mzuu14oy DOT fsf AT penguin DOT cs DOT ucla DOT edu> <20050128091600 DOT GD13052 AT matsrv DOT math DOT cas DOT cz> <20050128111251 DOT GA29166 AT iam DOT uni-bonn DOT de> <87sm4lp7pf DOT fsf AT penguin DOT cs DOT ucla DOT edu> <2005-01-29-14-07-53+17789+adl AT gnu DOT org> <20050129134318 DOT GC29209 AT orchestra DOT cs DOT caltech DOT edu> <2005-01-29-15-03-54+19292+adl AT gnu DOT org> <20050129143419 DOT GB27511 AT orchestra DOT cs DOT caltech DOT edu>
Mime-Version: 1.0
In-Reply-To: <20050129143419.GB27511@orchestra.cs.caltech.edu>
User-Agent: Mutt/1.4.1i
X-Virus-Status: Clean
X-Spam-Status: No, hits=-1.5 required=5.0 tests=BAYES_01 autolearn=no version=2.64
X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on matsrv.math.cas.cz

Hello,

On Sat, Jan 29, 2005 at 06:34:19AM -0800, Noah Misch wrote:
> On Sat, Jan 29, 2005 at 03:03:53PM +0100, Alexandre Duret-Lutz wrote:
> > $ strace bash -c '{ foo; } 2>/dev/null' 2>&1 | grep clone
> > clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7f93bc8) = 19138
...
> It indeed turns out that `bash' and the V7 Bourne shell fork in all three cases,
> `ash' and `pdksh' fork only in the first two, and `zsh' forks for none.

I had to use
	$ strace bash -c '{ foo; } 2>/dev/null' 2>&1 | grep fork
with my Linux 2.4.x kernel.

But yes, this proves that "{ ...; }" has no advantage over "(exec ...)".

This also means that we don't need any benchmark from the Cygwin people.
(I apologize to cygwin subscribers.)

Thank you, Alexandr,
	Stepan Kasal

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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