[issue42968] multiprocessing handle leak on Windows when child process is killed during startup/unpickling

2021-01-19 Thread Daniel Grunwald
Daniel Grunwald added the comment: Fix idea: get_spawning_popen().pid could be used to directly copy the handle into the child process, thus avoiding the temporary copy in the main process. This would help at least in our case (where we pass all connections during startup). I don't kn

[issue42968] multiprocessing handle leak on Windows when child process is killed during startup/unpickling

2021-01-19 Thread Daniel Grunwald
New submission from Daniel Grunwald : Running the attached script deadlocks. Uncommenting the `time.sleep(1)` in the script makes the deadlock disappear. For context: our application uses multiple child processes (multiprocessing.Process) and uses pipes (multiprocessing.Pipe) to communicate