Re: Python deadlocks when Popen in multithread.

2010-10-12 Thread INADA Naoki
I've found the bug http://bugs.python.org/issue1731717. It seems wating subprocess can be multithreaded but creating subprocess cannot. On Oct 12, 9:57 am, INADA Naoki wrote: > On Oct 12, 5:33 am, Jed Smith wrote: > > > On Mon, Oct 11, 2010 at 4:19 PM, INADA Naoki wrote: > > > def worker(): > >

Re: Python deadlocks when Popen in multithread.

2010-10-11 Thread INADA Naoki
On Oct 12, 5:33 am, Jed Smith wrote: > On Mon, Oct 11, 2010 at 4:19 PM, INADA Naoki wrote: > > def worker(): > >    p = Popen(["cat"], stdin=PIPE, stdout=PIPE, stderr=STDOUT) > >    out = p.communicate("hoge")[0] > >    print "%s %s" % (current_thread().name, out) > > If, instead of spawning work

Re: Python deadlocks when Popen in multithread.

2010-10-11 Thread Jed Smith
On Mon, Oct 11, 2010 at 4:19 PM, INADA Naoki wrote: > def worker(): >    p = Popen(["cat"], stdin=PIPE, stdout=PIPE, stderr=STDOUT) >    out = p.communicate("hoge")[0] >    print "%s %s" % (current_thread().name, out) If, instead of spawning workers you directly call worker(), does it succeed?