Re: [PATCH] receive-pack: interrupt pre-receive when client disconnects
From: Robin Jarry <hidden>
Date: 2022-01-26 12:46:06
From: Robin Jarry <hidden>
Date: 2022-01-26 12:46:06
Jiang Xin, Jan 26, 2022 at 08:17:
We used to ignore the SIGPIPE signal when calling "pre-receive" hook, so we could tolerant a buggy "pre-receive" implementation which didn't consume all the input from "receive-pack". On the other side, "ctrl-c" from the client side will terminate "receive-pack", only if we do not ignore the SIGPIPE signal when running "pre-receive". Wouldn't this be much simpler: add a new configuration variable "receive.loosePreReceiveImplementation", and only ignore SIGPIPE when "receive-pack" turns off the config variable?
I had not thought of this. Yes it would be much simpler. I'll prepare another patch with this approach. Thanks!