This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: _AS_DETECT_BETTER_SHELL speedup
- From: Stepan Kasal <kasal at ucw dot cz>
- To: autoconf-patches at gnu dot org
- Cc: cygwin at cygwin dot com
- Date: Mon, 31 Jan 2005 08:30:08 +0100
- Subject: Re: _AS_DETECT_BETTER_SHELL speedup
- References: <87k6pydbfw.fsf@penguin.cs.ucla.edu> <20050127174957.GC12120@iam.uni-bonn.de> <87mzuu14oy.fsf@penguin.cs.ucla.edu> <20050128091600.GD13052@matsrv.math.cas.cz> <20050128111251.GA29166@iam.uni-bonn.de> <87sm4lp7pf.fsf@penguin.cs.ucla.edu> <2005-01-29-14-07-53+17789+adl@gnu.org> <20050129134318.GC29209@orchestra.cs.caltech.edu> <2005-01-29-15-03-54+19292+adl@gnu.org> <20050129143419.GB27511@orchestra.cs.caltech.edu>
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/