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

2012-12-04 Thread Johannes Schindelin
Hi kusma, On Sat, 1 Dec 2012, Erik Faye-Lund wrote: On Fri, Nov 30, 2012 at 6:58 PM, Johannes Schindelin johannes.schinde...@gmx.de wrote: Hi, On Tue, 13 Nov 2012, Erik Faye-Lund wrote: Set a control-handler to prevent the process from terminating, and simulate SIGINT so it can be

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

2012-12-04 Thread Erik Faye-Lund
On Tue, Dec 4, 2012 at 6:12 PM, Johannes Schindelin johannes.schinde...@gmx.de wrote: Hi kusma, On Sat, 1 Dec 2012, Erik Faye-Lund wrote: On Fri, Nov 30, 2012 at 6:58 PM, Johannes Schindelin johannes.schinde...@gmx.de wrote: Hi, On Tue, 13 Nov 2012, Erik Faye-Lund wrote: Set a

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

2012-12-03 Thread Erik Faye-Lund
On Sun, Dec 2, 2012 at 11:42 AM, Junio C Hamano gits...@pobox.com wrote: Erik Faye-Lund kusmab...@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,

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

2012-12-03 Thread Junio C Hamano
Erik Faye-Lund kusmab...@gmail.com writes: 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

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

2012-12-02 Thread Junio C Hamano
Erik Faye-Lund kusmab...@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) { -

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

2012-12-01 Thread Erik Faye-Lund
On Fri, Nov 30, 2012 at 7:11 PM, Jeff King p...@peff.net wrote: On Fri, Nov 30, 2012 at 06:58:11PM +0100, Johannes Schindelin wrote: Hi, On Tue, 13 Nov 2012, Erik Faye-Lund wrote: Set a control-handler to prevent the process from terminating, and simulate SIGINT so it can be handled by a

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

2012-12-01 Thread Erik Faye-Lund
On Fri, Nov 30, 2012 at 6:58 PM, Johannes Schindelin johannes.schinde...@gmx.de wrote: Hi, On Tue, 13 Nov 2012, Erik Faye-Lund wrote: Set a control-handler to prevent the process from terminating, and simulate SIGINT so it can be handled by a signal-handler as usual. One thing you might

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

2012-12-01 Thread Jeff King
On Sat, Dec 01, 2012 at 01:31:23PM +0100, Erik Faye-Lund wrote: One thing you might want to mention is that the fgetc() handling is not thread-safe, and intentionally so: if two threads read from the same console, we are in trouble anyway. That makes sense to me, but I'm confused why it

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

2012-11-30 Thread Johannes Schindelin
Hi, On Tue, 13 Nov 2012, Erik Faye-Lund wrote: Set a control-handler to prevent the process from terminating, and simulate SIGINT so it can be handled by a signal-handler as usual. One thing you might want to mention is that the fgetc() handling is not thread-safe, and intentionally so: if

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

2012-11-30 Thread Jeff King
On Fri, Nov 30, 2012 at 06:58:11PM +0100, Johannes Schindelin wrote: Hi, On Tue, 13 Nov 2012, Erik Faye-Lund wrote: Set a control-handler to prevent the process from terminating, and simulate SIGINT so it can be handled by a signal-handler as usual. One thing you might want to

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

2012-11-13 Thread Erik Faye-Lund
Set a control-handler to prevent the process from terminating, and simulate SIGINT so it can be handled by a signal-handler as usual. Signed-off-by: Erik Faye-Lund kusmab...@gmail.com --- compat/mingw.c | 76 ++ compat/mingw.h | 6 + 2