Vista + Rails 2.0 upgrade => subprocess hangs

Christian Heimes lists at cheimes.de
Wed Dec 12 21:26:52 EST 2007


Eric Promislow wrote:
>> Your usage of wait() is dangerous. The code can block indefinitely when
>> the stdout or stderr buffer is full.
>>
>> Christian
> 
> That's what it is.  `rake -T` returns more data in Rails 2.0.1
> than it did in 1.2.6 -- cross-language breakage logically explained.
> Thank you, Christian.

You can use stdout, stderr = p.communicate() but keep in mind that the
data is buffered in memory. I suggest a temporary file if you expect
more than a couple of MB.

Christian



More information about the Python-list mailing list