Hello Elizabeth, On Thu, 25 Jun 2015 20:23:44 +0300 Elizabeth Shashkova <elizabeth.shashk...@gmail.com> wrote: > Hello everybody! > > When I call fork() inside a daemon thread, the main thread in the child > process has the "daemon" property set to True. This is very confusing, > since the program keeps running while the only thread is a daemon. > According to the docs, if all the threads are daemons the program should > exit. Here is an example: > [...] > > Is it a bug in the CPython implementation?
Yes, it looks like a bug. You can report it at http://bugs.python.org > Also let's assume the second example. I have another non-daemon thread > in the child process and want to detect this situation. Does anybody > know a way to find such fake daemon threads that are really main > threads? There should really be only one fake daemon thread, since there's only one main thread. And after calling fork(), you know what the main thread is :-) Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com