Subject: Re: [PATCH 01/10] run-command: add stdin callback for parallelization

From: Adrian Ratiu <[email-masked]>
Date: Mon, 06 Oct 2025 15:59:24 +0300

Hi Patrick and thanks for review! I'll fix in v2 all the issues 
you pointed out.

On Thu, 02 Oct 2025, Patrick Steinhardt <[email-masked]> wrote:
>> +		 * child input is provided via path_to_stdin when 
>> the feed_pipe cb is +		 * missing, so we just 
>> signal an EOF.  +		 */ +		if 
>> (!opts->feed_pipe) { +			close(proc->in); + 
>> proc->in = 0; 
> 
> Hm. It's curious that we use a valid file descriptor 
> here. Shouldn't we rather use `-1`? Otherwise I could see that 
> we might try to close this seemingly valid file descriptor at a 
> later point in time. 
> 

I actually asked myself this while preparing the patches, since -1 
is a better fit.

I only left = 0 for historical reasons, to not modify these 
patches too much. :) However I do 100% agree with both you and 
Junio that -1 should be used here.

Will do in v2.