Skip to content

Commit

Permalink
mingw: make mingw_signal return the correct handler
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Erik Faye-Lund authored and Junio C Hamano committed Jun 10, 2013
1 parent b1c418e commit a454065
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion compat/mingw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit a454065

Please sign in to comment.