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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux