Re: [PATCH/RFC 1/5] mingw: make fgetc raise SIGINT if apropriate
- From
Erik Faye-Lund <kusmabite@gmail.com>
- Date
- Dec 3, 2012, 23:29 UTC
- Message-ID
- <CABPQNSb2NQesbjKc8LUT0TL4=xrnw2A_sJyjX72j9Je_zX1sQw@mail.gmail.com>
- In-Reply-To
- <7vfw3oka68.fsf@alter.siamese.dyndns.org>
On Sun, Dec 2, 2012 at 11:42 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 21 quoted lines
> Erik Faye-Lund <kusmabite@gmail.com> writes:
>
>> @@ -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?