[Issue 6846] std.concurrency and fork/execv

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon May 9 15:57:49 PDT 2016


Vladimir Panteleev <thecybershadow at gmail.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |thecybershadow at gmail.com
         Resolution|---                         |INVALID

--- Comment #2 from Vladimir Panteleev <thecybershadow at gmail.com> ---
You are mixing threads with forking. This is a bad idea in any language.

What happens is that a thread from the main process forks, but it doesn't take
along with it the other threads. One of those threads is running the GC, which
holds a lock. As the GC thread is not duplicated during the fork, the lock will
never be freed, thus the forked process will deadlock.


More information about the Digitalmars-d-bugs mailing list