EDIT: Oh, I'd skipped the part above "here's how it works"... that just says exactly the same thing I said above.
EDIT: Oh, I'd skipped the part above "here's how it works"... that just says exactly the same thing I said above.
I believe I had trouble executing any instructions in the new process at all. If you can make it work I'd like to see your code, otherwise I'm skeptical.
Anyways the cygwin guys claim to have forked processes with ZwCreateProcess, but just had problems with getting it to work with the win32 subsystem: http://www.cygwin.com/ml/cygwin-developers/2011-04/msg00034....
Also this guy seems to have managed to do it: http://stackoverflow.com/questions/10657699/cant-use-createp..., but it hang when he called a win32 function (CreateProcess) from the child.
Keep in mind that the whole _point_ of Cygwin is to interact with the Windows world. If you want a POSIX sandbox, you can use a VM with fewer headaches and better performance.
For me, Cygwin has always been pretty much native-speed, its only an API translation layer.
Running scripts?
Also, try enumerating the files in a large directory hierarchy and compare it with native Windows speed (or Linux speed), it's not even comparable.
Personally tho, speed has always been sufficient for me to never notice. I use it most days, but I don't do comparisons.
It's not a question of a 40% speed difference, more like a > 400% speed difference last time I checked.
One way to really see the latter is to try to create a git clone using the --reference option against a repo on a mapped drive; msysgit using the drive letter is OK, but cygwin git against the same repo via /cygdrive/mapped is very slow.
Edit: by 'everything that works' I mean everything that interacts with the terminal in a standard way. There are some command line utilities which output to the terminal some way other than stdout, making them very difficult to use in cygwin.
Keep in mind that in addition to the build steps, it's common to break out to sed, grep, and shell to get basic string operations done due to extremely limited capability of make itself. On cygwin, this is slow for large projects.
Cygwin's forking is also temperamental.
https://cygwin.com/cygwin-ug-net/highlights.html#ov-hi-proce...
"In summary, current Windows implementations make it impossible to implement a perfectly reliable fork, and occasional fork failures are inevitable."
I wonder how the authors of midipix propose to resolve the listed issues.