Re: [PATCHv15 2/5] run_processes_parallel: add LF when caller is sloppy
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 31 quoted lines
> Stefan Beller wrote:
>> On Wed, Feb 24, 2016 at 1:19 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
>> > Stefan Beller wrote:
>
>>>> When the callers of parallel processing machine are sloppy with their
>>>> messages, make sure the output is terminated with LF after one child
>>>> process is handled.
>>>
>>> Why not always add \n here?
>>
>> So you propose to always add a \n if the output length was > 0 ?
>
> Ah, now I see where I was confused.
> ...
> get_next_task_fn et al looked similar to that pattern, but they are
> doing something different.
> ...
> The functions default_start_failure and default_task_finished are
> buggy under that API, since they do not include newlines in their
> output.
>
> Once they're fixed, there wouldn't be any need to add \n, unless we
> are worried about a child process that writes output that doesn't end
> with a newline. It can be convenient for child processes to do things
> like
>
> printf '%s\t' "some information"
>
> so I am not convinced this patch is helping.
>
> Does that make sense?
Sounds very sensible analysis. Thanks.