Thread (26 messages) flat view 26 messages, 4 authors, 2016-06-15

Re: [PATCH/RFC 1/5] mingw: make fgetc raise SIGINT if apropriate

From: Erik Faye-Lund <hidden>
Date: 2016-06-15 22:55:28

On Sun, Dec 2, 2012 at 11:42 AM, Junio C Hamano [off-list ref] wrote:
Erik Faye-Lund [off-list ref] writes:
quoted
@@ -1538,13 +1563,7 @@ static sig_handler_t timer_fn = SIG_DFL;
 static unsigned __stdcall ticktack(void *dummy)
 {
      while (WaitForSingleObject(timer_event, timer_interval) == WAIT_TIMEOUT) {
-             if (timer_fn == SIG_DFL) {
-                     if (isatty(STDERR_FILENO))
-                             fputs("Alarm clock\n", stderr);
-                     exit(128 + SIGALRM);
-             }
-             if (timer_fn != SIG_IGN)
-                     timer_fn(SIGALRM);
+             mingw_raise(SIGALRM);
              if (one_shot)
                      break;
      }
This hunk seems to have been based on a slightly newer codebase than
what I have, and I had to wiggle the patch a bit to make the series
apply.
Huh, no, it shouldn't be; it's based on 8c7a786 ("Git 1.8.0").

OH! I see now what the problem is... I *missed* a patch in the series! :P

That patch corrected the exit-code for our SIGALRM's SIG_DFL routine;
the old code did "die("Alarm");", but the new one does "fputs("Alarm
clock\n", stderr); exit(128 + SIGALRM)"
Please double check the result when I push out the 'pu'
branch.
The resolution is fine; you effectively got the two commits squashed.
I'll send out a new version with the extra patch added, and your
signature-fixup squashed in, OK?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help