summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorErik Faye-Lund <kusmabite@gmail.com>2013-06-10 07:48:17 +0200
committerJunio C Hamano <gitster@pobox.com>2013-06-10 12:34:03 -0700
commita45406585b0a42e38e580baf47b0daf631c5e454 (patch)
tree3c27783cda7d64c1e75bb41997f645811cb973b3 /compat
parentb1c418e155a86a1a6104c20e5424d847e516c8d7 (diff)
downloadgit-a45406585b0a42e38e580baf47b0daf631c5e454.tar.gz
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>
Diffstat (limited to 'compat')
-rw-r--r--compat/mingw.c4
1 files changed, 3 insertions, 1 deletions
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;