subprocess.Popen deadlocks

eraserix eraserix at gmail.com
Fri Nov 12 15:28:45 CET 2010


On Nov 12, 6:58 am, Lawrence D'Oliveiro <l... at geek-
central.gen.new_zealand> wrote:
> In message
> <2cf9a225-7d1c-4490-8a62-807e79bdd... at n30g2000vbb.googlegroups.com>,
>
> Why not skip all the threads and just spawn all the processes in your main
> loop? Then after getting the SIGINT, send that signal to all your processes,
> and then do a bunch of os.waitpid calls to clean them all up.

Thanks for the hint. You are right, the problem could be solved
singlethreaded by doing some sort of polling (my description
simplified things a bit) avoiding the multithreading problems
altogether.

I had another look at the subprocesses module and discovered the
actual bug. I describe it in issue 10394.

Christoph



More information about the Python-list mailing list