2 ms·
"Most things are there, just done in very different ways." Does it have something like the POSIX fork() system call? Apparently, its lack in Windows is the ma
by pmoriarty 12y ago
"Most things are there, just done in very different ways."
Does it have something like the POSIX fork() system call? Apparently, its lack in Windows is the main thing that makes Cygwin as slow as it is.[1]
[1] - http://stackoverflow.com/questions/2512892/how-to-speed-up-cygwin http://stackoverflow.com/questions/2512892/how-to-speed-up-c...
- pjmlp 12y agoOnly UNIX clones support fork() properly, because only UNIX clones processes. Any other non UNIX OS tends not to fully provide 100% fork() in they POSIX compatibility layer, or kind of fake it.
- arthurcolle 12y agoSorry for the stupid question but does that mean you can't write C code in Windows that calls fork()?
- sitharus 12y agoYou are correct, fork() is part of the POSIX specification, Windows does not implement POSIX.
- zmmmmm 12y agoI'm not really an expert but I'm pretty sure you can call fork but you will pay a full cost of a creating a new process, manually copying the memory state to the new process and parent and child have to do a complicated dance to ensure it all happens right. So it works and most of the semantics are the same, but it is god awful slow.
- cplease 12y ago> you can call fork but you will pay a full cost of a creating a new process, manually copying the memory state to the new process and parent and child have to do a complicated dance to ensure it all happens right That fork() and associated dance happens in cygwin1.dll or the equivalent POSIX compatibility library. Windows has no fork to call.