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>
Erik Faye-Lund committed
Jun 10, 2013 at 07:48 UTC
a45406585b0a42e38e580baf47b0daf631c5e454
1 file changed
+3
-1
compat/mingw.c
+3
-1
@@ -1677,14 +1677,16 @@ int sigaction(int sig, struct sigaction *in, struct sigaction *out)
1677
#undef signal
1678
sig_handler_t mingw_signal(int sig, sig_handler_t handler)
1679
{
1680
- sig_handler_t old = timer_fn;
1680
+ sig_handler_t old;
1681
1682
switch (sig) {
1683
case SIGALRM:
1684
+ old = timer_fn;
1685
timer_fn = handler;
1686
break;
1687
1688
case SIGINT:
1689
+ old = sigint_fn;
1690
sigint_fn = handler;
1691
break;
1692