process creation surgery

Christopher Faylor
Mon Jul 16 20:54:00 GMT 2001

I just changed the way that the cygheap is allocated in an effort
to eliminate the previously required synchronization between a
cygwin parent process and its child. (I've had a few days on the
beach to think about this...)

Basically, I moved all of the cygheap copying to the parent, which
creates a shared memory region that is used only by the child.

This should mean that spawn/nowait and vfork should no longer hang
when invoking a non-cygwin child since there is no need for the
parent to wait around for a signal from the child indicating that
the cygheap has been copied.

However, this is a fairly major change and I expect that I probably
got synchronization wrong somehow.  I have tested this in a basic
form using the limited facilities that I have available to me on
vacation and it seems to work ok on Windows NT 4.0 and 95.

If there are problems, I'll deal with them when I return from vacation.
One obvious problem would be that the bash prompt shows up prior to a
process exiting, so, e.g., you get a bash prompt in the middle of
ls output.


More information about the Cygwin-developers mailing list