Subject: Re: [PATCH v7 11/17] run-command: allow stdin for run_processes_parallel

From: Jonathan Tan <[email-masked]>
Date: Sun, 31 Jan 2021 21:38:08 -0800

> diff --git a/run-command.c b/run-command.c
> index ea4d0fb4b1..80c8c97bc1 100644
> --- a/run-command.c
> +++ b/run-command.c
> @@ -1683,6 +1683,9 @@ static int pp_start_one(struct parallel_processes *pp)
>  	if (i == pp->max_processes)
>  		BUG("bookkeeping is hard");
>  
> +	/* disallow by default, but allow users to set up stdin if they wish */
> +	pp->children[i].process.no_stdin = 1;
> +

This makes sense. May be worth a more detailed comment, e.g.:

  By default, do not inherit stdin from the parent process. (If not, all
  children would share it!) Users may overwrite this by having the
  get_next_task function assign 0 to no_stdin and an appropriate integer
  to in.