[OE-core] [PATCH] devtool: fix handling of unicode characters from subprocess stdout
Paul Eggleton
paul.eggleton at linux.intel.com
Wed Nov 16 22:21:53 UTC 2016
On Wed, 16 Nov 2016 09:14:20 Stephano Cetola wrote:
> On 11/11, Burton, Ross wrote:
> > 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.
>
> I've tested this and it fixes the issue, and resolves this bug:
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=10649
>
> We may be able to stream this without blocking using
> Queue.get_nowait(). This could solve the looping issue as well, as
> you'd be looping over stdout.readline and placing that in the queue,
> rather than looping over each character.
FWIW I'd rather see this one merged and the issue fixed and we can optimise it
later, especially as the original version used a single-byte read.
Thanks Jiajie for fixing the issue I caused and Stephano for verifying.
Acked-by: Paul Eggleton <paul.eggleton at linux.intel.com>
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
More information about the Openembedded-core
mailing list