Re: [PATCH] receive-pack: interrupt pre-receive when client disconnects
- From
- Robin Jarry <robin.jarry@6wind.com>
- Date
- Jan 26, 2022, 12:46 UTC
- Message-ID
- <CHFM74053TIA.3G3CIXQYDMDXS@diabtop>
- In-Reply-To
- <CANYiYbGRK0eshjUJoPH0yWT1tVLoerOMC6CY6tAMrwAh7T+y1g@mail.gmail.com>
Jiang Xin, Jan 26, 2022 at 08:17:
Show 9 quoted lines
> 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!