[issue5906] Risk of confusion in multiprocessing module - daemonic processes

Eryk Sun report at bugs.python.org
Sat Apr 1 20:19:38 EDT 2017


Eryk Sun added the comment:

> I've personally found this `multiprocessing` restriction (daemonic 
> processes can't have children) to be nothing but a pain in the ass 

To make that reliable on Windows you could create a silent-breakaway, kill-on-close Job object in each process for its daemon children. Closing the job handle would cascade terminate all descendant daemon processes in that branch of the process tree, i.e. when a process is terminated it closes the Job handle, which terminates all of its daemon children, which closes their Job handles, which terminates all of their daemon children, and so on. Non-daemons would still be orphaned when the parent is terminated.

----------
nosy: +eryksun

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5906>
_______________________________________


More information about the Python-bugs-list mailing list