Re: [PATCH v7 10/12] run-command: poll child stdin in addition to stdout
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 22, 2026, 17:20 UTC
- Message-ID
- <xmqqv7gto96s.fsf@gitster.g>
- In-Reply-To
- <877bt9rk0f.fsf@collabora.com>
Adrian Ratiu <adrian.ratiu@collabora.com> writes:
Show 7 quoted lines
> Yes, it is odd and it's a weirdness of the run-command.c child fd > handling logic where .in, .out and .err are initialized to 0. > > Patrick raised this up as well in one of the previous patches, however > reworking run-command to not use 0 sentinel values for fd's is quite the > big unrelated patch (I gave up after spending about 1.5 days on it at > the time).
Thanks. I didn't realize that this was already discussed.
> Maybe one day we can also fix this weird aspect of the run-command API.
At least a comment somewhere would be sufficient to avoid others waste (your) time like I just did, wondering why fd=0 is special, even they know that it is unlikely to get fd=0 from a fresh new open()/dup() etc. in our codebase.
Thanks.