I am using pythons multiprocessing library to create some subprocesses. I implemented a way to terminate my child-processes gracefully.
To terminate them even if my main-process has a crash, I made all child-processes daemons as well.
My question is now: Who is responsible for terminating daemons, if the main process had a very hard crash or is killed immediately? Is the python-interpreter killing the child-processes or is the OS killing them as soon as the main-process is dead?
From the python documentation, I got
When a process exits, it attempts to terminate all of its daemonic child processes.
But for me that sounds like it is not guaranteed.
Does anybody know what the exact behaviour is?
I am working on Windows, but if Linux behaves different, it would also be interesting.