Larry McVoy | 3 Jul 03:13
Favicon

Re: Future [exec] overhaul

On Thu, Jul 03, 2008 at 12:45:12AM +0100, Donal K. Fellows wrote:
> Larry McVoy wrote:
> > We've been pretty happy with ours even though it doesn't fork /bin/sh.
> > And the nice thing is it works when there is no /bin/sh (winblows).
> 
> Firing off /bin/sh as a subprocess is no big deal. 

It's about 3x the cost of fork+exec on Linux, which has the best
numbers around.  Try it on windows or macos or solaris and it's worse.
So firing off a shell for some stuff is no big deal, firing off shell
to run something small can hurt if you do it a lot.

And when you are on windows with no shell?

I'm not against /bin/sh, I code in shell scripts all the time.  But
for a [system] interface you mostly don't need sh, you can emulate
the bits people use cheaply and it is much lighter weight.
--

-- 
---
Larry McVoy                lm at bitmover.com           http://www.bitkeeper.com

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08

Gmane