Re: [PATCH v7 10/12] run-command: poll child stdin in addition to stdout
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 27, 2026, 00:11 UTC
- Message-ID
- <xmqqms1zhq3s.fsf@gitster.g>
- In-Reply-To
- <CAJoAoZn9Y1xqtc1hWDvM+_rmcANkGUtfSA1HGTaHjtw0DuXyAw@mail.gmail.com>
Emily Shaffer <nasamuffin@google.com> writes:
Show 8 quoted lines
>> + /* for each potential child slot, prepare two pollfd entries */
>> + for (size_t i = 0; i < opts->processes; i++) {
>> + if (child_is_working(&pp->children[i]) &&
>> + pp->children[i].process.err > 0) {
>
> I only had the one tiny nit on this patch, which was to wonder if
> checking for pp->children[i].process.err is something that should also
> be behind a conveniently-named helper like child_is_working().We already have
- child_is_ready_for_cleanup() - child_is_receiving_input() - child_is_working()
What should the "child is working and process.err is positive" be called? child_is_spewing_error()?
Thanks.