]> git.ipfire.org Git - thirdparty/git.git/commit
run-command: allow stdin for run_processes_parallel
authorEmily Shaffer <emilyshaffer@google.com>
Wed, 8 Feb 2023 19:21:12 +0000 (20:21 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 8 Feb 2023 20:50:03 +0000 (12:50 -0800)
commit540267304d37d6257edb3144e770693071d8fbb7
tree0d48aff6dbbd8f661bd70c0a95bd98392ae4a984
parent5123e6e7bd3b0bf3777cb77e36d141f76d8604a4
run-command: allow stdin for run_processes_parallel

While it makes sense not to inherit stdin from the parent process to
avoid deadlocking, it's not necessary to completely ban stdin to
children. An informed user should be able to configure stdin safely. By
setting `some_child.process.no_stdin=1` before calling `get_next_task()`
we provide a reasonable default behavior but enable users to set up
stdin streaming for themselves during the callback.

`some_child.process.stdout_to_stderr`, however, remains unmodifiable by
`get_next_task()` - the rest of the run_processes_parallel() API depends
on child output in stderr.

Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
run-command.c