On 09/11/2015 00:38, Samuli Seppänen wrote:
Hi,
I plan to add a control-C handler in win32.c. The handler will simply
map it to SIGTERM. Is there any particular reason why control-C is not
currently handled?
Hi,
I forwarded this email to James - he might have a clue.
Currently the Windows implementation, when running in console mode, uses
function keys to trigger various Unix signals (see win32_signal_get()
function in win32.c).
The current code looks like this:
switch (win32_keyboard_get (ws))
{
case 0x3B: /* F1 -> USR1 */
ret = SIGUSR1;
break;
case 0x3C: /* F2 -> USR2 */
ret = SIGUSR2;
break;
case 0x3D: /* F3 -> HUP */
ret = SIGHUP;
break;
case 0x3E: /* F4 -> TERM */
ret = SIGTERM;
break;
}
It's probably okay to just make CTRL-c generate a SIGTERM as F4 is
already doing.
James