On Thu, 19 Feb 2015 16:33:58 +0000, Byron Heads wrote: > Now I am not sure. This code runs correctly:
as i told you before, `fork()` is hard. you can experiment for monthes seeing strange bugs here and there, and seeing no bugs, and strange bugs, and... there are alot of things going on under the hood, and alot of things aren't. strictly speaking you *CAN'T* get cloned process in the same state as it's parent. it may work, though, if stars are in a good shape. i can give you a simple test that will tell you if you should avoid `fork ()` in your code: unless you can explain what is going on in kernel, glibc, pthreads and druntime exactly in the moment of forking, without looking to mans, documentation and source code of all components -- avoid using `fork()`. i can explain ~2/3, so i'm not using `fork()` in my code. ;-)
signature.asc
Description: PGP signature