From a45406585b0a42e38e580baf47b0daf631c5e454 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 10 Jun 2013 07:48:17 +0200 Subject: [PATCH] mingw: make mingw_signal return the correct handler Returning the SIGALRM handler for SIGINT is not very useful. Signed-off-by: Erik Faye-Lund Signed-off-by: Johannes Sixt Signed-off-by: Junio C Hamano --- compat/mingw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compat/mingw.c b/compat/mingw.c index b673625580..dae30a081c 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1677,14 +1677,16 @@ int sigaction(int sig, struct sigaction *in, struct sigaction *out) #undef signal sig_handler_t mingw_signal(int sig, sig_handler_t handler) { - sig_handler_t old = timer_fn; + sig_handler_t old; switch (sig) { case SIGALRM: + old = timer_fn; timer_fn = handler; break; case SIGINT: + old = sigint_fn; sigint_fn = handler; break; -- 2.11.4.GIT