Re: [PATCHv15 2/5] run_processes_parallel: add LF when caller is sloppy
From: Junio C Hamano <hidden>
Date: 2016-06-15 23:08:26
Jonathan Nieder [off-list ref] writes:
Stefan Beller wrote:quoted
On Wed, Feb 24, 2016 at 1:19 PM, Jonathan Nieder [off-list ref] wrote:quoted
Stefan Beller wrote:quoted
quoted
quoted
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.