Mail Archives: cygwin-developers/2002/01/29/01:57:16
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 -