This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fork() idea


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]