3 ms·
Sorry for the stupid question but does that mean you can't write C code in Windows that calls fork()?
by arthurcolle 12y ago
Sorry 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.