I tried to follow the original implementation here. It seems that a simple read() is blocking and the output of the subprocess cannot be redirected in time. E.g., ‘Note: Fetching …’ is not shown until the unpack is finished.
From: Burton, Ross [mailto:[email protected]] Sent: Friday, November 11, 2016 8:22 PM To: Hu, Jiajie <[email protected]> Cc: OE-core <[email protected]> Subject: Re: [OE-core] [PATCH] devtool: fix handling of unicode characters from subprocess stdout On 11 November 2016 at 06:02, Jiajie Hu <[email protected]<mailto:[email protected]>> wrote: + reader = codecs.getreader('utf-8')(process.stdout) buf = '' while True: - out = process.stdout.read(1) - out = out.decode('utf-8') + out = reader.read(1, 1) A reader is definitely the right thing here, but I'm wondering why this needs to loop on single characters. As I understand it doing a read() on a reader wrapping stdout will read until it blocks (because the process hasn't got anything to output) so result in less pointless iterating. Ross
-- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
