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. ;-)

Attachment: signature.asc
Description: PGP signature

  • GC deadlocks on linux Byron Heads via Digitalmars-d-learn
    • Re: GC deadlocks on linu... ketmar via Digitalmars-d-learn
      • Re: GC deadlocks on ... Byron Heads via Digitalmars-d-learn
        • Re: GC deadlocks... ketmar via Digitalmars-d-learn
          • Re: GC deadl... Byron Heads via Digitalmars-d-learn
            • Re: GC ... Byron Heads via Digitalmars-d-learn
              • Re:... Byron Heads via Digitalmars-d-learn
              • Re:... ketmar via Digitalmars-d-learn
              • Re:... ketmar via Digitalmars-d-learn
              • Re:... Byron Heads via Digitalmars-d-learn
                • ... ketmar via Digitalmars-d-learn
                • ... Steven Schveighoffer via Digitalmars-d-learn
                • ... ketmar via Digitalmars-d-learn
                • ... via Digitalmars-d-learn
                • ... ketmar via Digitalmars-d-learn
                • ... via Digitalmars-d-learn
                • ... ketmar via Digitalmars-d-learn
                • ... Kagamin via Digitalmars-d-learn
                • ... via Digitalmars-d-learn
                • ... ketmar via Digitalmars-d-learn
                • ... Kagamin via Digitalmars-d-learn

Reply via email to