Re: [PATCH 4/9] run-command: add support for timeout in command finisher
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- May 21, 2026, 07:21 UTC
- Message-ID
- <b69605a6-e841-47b9-a899-a57e184d3c8b@kdbg.org>
- In-Reply-To
- <f58c8c522814dce9257f64733e9fbc9bd9f446c0.1779207350.git.siddh.raman.pant@oracle.com>
Am 19.05.26 um 18:30 schrieb Siddh Raman Pant:
Show 5 quoted lines
> A called command may not respond to the initial signal and will get > stuck in finish_command() -> wait_or_whine(). > > So let's add timeout support into the finisher so that if a deadline > occurs, we can send a force-kill signal.
This is extremely suspicious. A communication protocl with a child program that requires to kill the child looks like a design error. A band-aid like this timeout should not be necessary for a well-behaved child process.
If the (your?) problem is that the child process is actually not well-behaved, then I suggest to use a middle-man as child process that behaves well from the point of view of the git process, but can punish the ill-behaved downstream process when needed.
Please, do not add this infrastructure to core Git, and instead fix the communication protocol.
> > The force-kill signal is in the argument because a program may trap a > signal, so it is the responsibility of caller to pass the correct kill > signal.
-- Hannes