From: Jonathan Tan Date: Mon, 01 Feb 2021 05:38:08 GMT Subject: Re: [PATCH v7 11/17] run-command: allow stdin for run_processes_parallel Message-ID: <20210201053808.1309469-1-jonathantanmy@google.com> In-Reply-To: <20201222000220.1491091-12-emilyshaffer@google.com> > 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.