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


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?

--
Gary R. Van Sickle
Brewer.  Patriot.


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