Re:Fork() without exec() is dangerous in large programs
by hyperbovine on Wednesday August 17, 2016 @07:03AM
(#12303732)
I ran into this exact problem recently in a multithreaded Python app and spent two days trying to figure out wtf was going on. The multiprocessing spawn startup mode that was added in 3.4 solves this for most use cases at the expense of a small performance hit. For 2.x you are SOL however.
[ Parent
| on HN ]
Re:Fork() without exec() is dangerous in large programs
by evanj on Wednesday August 17, 2016 @07:46AM
(#12303922)
Part of my motivation for writing these things is because after I've wasted so much time, I'd love to help others not do the same. Hopefully the article shows up when you search for the right error message. Its also so I remember what the heck was happening.
Re: multiprocessing in 3.4: I think it is unfortunate that due to backwards compatibility, the "forkserver" mode can't become the default on Unix, since it would help avoid this particular issue.