Author neologix
Recipients amicitas, neologix
Date 2011-03-10.08:12:25
SpamBayes Score 2.09522e-05
Marked as misclassified No
Message-id <1299744747.0.0.593482518594.issue11459@psf.upfronthosting.co.za>
In-reply-to
Content
Could you try with the attached patch ?
The problem is that subprocess silently replaces bufsize=0, so child.stdout is actually buffered, and when you read just one byte, everything that's available for reading is read into the python's object buffer. Then, select/poll doesn't see the pipe as ready for reading since everything as already been read.
Mixing buffered I/O and select leads to trouble, you're right to pass bufsize=0, but I don't know why subprocess goes out of its way and buffers it anyway:
        if bufsize == 0:
            bufsize = 1  # Nearly unbuffered (XXX for now)
History
Date User Action Args
2011-03-10 08:12:27neologixsetrecipients: + neologix, amicitas
2011-03-10 08:12:26neologixsetmessageid: <1299744747.0.0.593482518594.issue11459@psf.upfronthosting.co.za>
2011-03-10 08:12:26neologixlinkissue11459 messages
2011-03-10 08:12:26neologixcreate