mingw: make mingw_signal return the correct handler

Returning the SIGALRM handler for SIGINT is not very useful.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Erik Faye-Lund 2013-06-10 07:48:17 +02:00 committed by Junio C Hamano
parent b1c418e155
commit a45406585b

View File

@ -1677,14 +1677,16 @@ int sigaction(int sig, struct sigaction *in, struct sigaction *out)
#undef signal #undef signal
sig_handler_t mingw_signal(int sig, sig_handler_t handler) sig_handler_t mingw_signal(int sig, sig_handler_t handler)
{ {
sig_handler_t old = timer_fn; sig_handler_t old;
switch (sig) { switch (sig) {
case SIGALRM: case SIGALRM:
old = timer_fn;
timer_fn = handler; timer_fn = handler;
break; break;
case SIGINT: case SIGINT:
old = sigint_fn;
sigint_fn = handler; sigint_fn = handler;
break; break;