Python deadlock using subprocess.popen and communicate

Atherun atherun at
Thu Sep 22 06:52:42 CEST 2011

On Sep 21, 8:58 pm, Roy Smith <r... at> wrote:
> In article <mailman.1343.1316663531.27778.python-l... at>,
>  Chris Rebert <c... at> wrote:
> > Popen.poll():
> >     Check if child process has terminated. Set **and return**
> > returncode attribute.
> > [Direct quote from the docs; emphasis added]
> Doh.  I read right past that and didn't see it.  Thanks for the
> correction.

I removed the loop and changed it to a single communicate now, still
get a deadlock.  All threads just stop, even threads that have nothing
to do with the ongoing subprocesses.  I specifically created a thread
that dumps the stack trace of all threads so I can try and view the
deadlocks, but that stops responding at the same time as the
deadlock.  This wasn't happening before so not sure why it changed

More information about the Python-list mailing list