Subject: Re: [PATCHv3 02/11] run-command: report failure for degraded output just once

From: Johannes Sixt <[email-masked]>
Date: Wed, 4 Nov 2015 21:36:13 +0100

Am 04.11.2015 um 21:14 schrieb Stefan Beller:
> On Wed, Nov 4, 2015 at 10:14 AM, Junio C Hamano <[email-masked]> wrote:
>> Imagine that we are running two things A and B at the same time.  We
>> ask poll(2) and it says both A and B have some data ready to be
>> read, and we try to read from A.  strbuf_read_once() would try to
>> read up to 8K, relying on the fact that you earlier set the IO to be
>> nonblock.  It will get stuck reading from A without allowing output
>> from B to drain.  B's write may get stuck because we are not reading
>> from it, and would cause B to stop making progress.
>>
>> What if the other sides of the connection from A and B are talking
>> with each other,
>
> I am not sure if we want to allow this ever. How would that work with
> jobs==1? How do we guarantee to have A and B running at the same time?

I think that a scenario where A and B are communicating is rather 
far-fetched. We are talking about parallelizing independent tasks. I 
would not worry.

-- Hannes