<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 25, 2015 at 12:23 PM, Elizabeth Shashkova <span dir="ltr"><<a href="mailto:elizabeth.shashkova@gmail.com" target="_blank">elizabeth.shashkova@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">When I call fork() inside a daemon thread, the main thread in the child process has the "daemon" property set to True.</blockquote></div><br>Didn't this (or a similar) topic come up here recently? For reference:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><a href="http://bugs.python.org/issue24512">http://bugs.python.org/issue24512</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">and</div><div class="gmail_extra"><br></div><div class="gmail_extra"><a href="https://docs.python.org/3.4/library/multiprocessing.html#contexts-and-start-methods">https://docs.python.org/3.4/library/multiprocessing.html#contexts-and-start-methods</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">from which I quote (emphasis mine):</div><div class="gmail_extra"><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_extra">The parent process uses os.fork() to fork the Python interpreter. The child process, when it begins, is <b>effectively identical to the parent process</b>. All resources of the parent are inherited by the child process. <b>Note that safely forking a multithreaded process is problematic</b>.</div></blockquote><div class="gmail_extra"><br></div><div class="gmail_extra">So, even if you get past this particular problem, the conventional wisdom is, "don't do that."</div><div class="gmail_extra"><br></div><div class="gmail_extra">Skip</div><div class="gmail_extra"><br></div></div>