Respond to Ctrl-C by immediately quitting. TCP/IP stack exit expects this.

This commit is contained in:
Chris Young 2012-12-07 23:35:57 +00:00
parent 04825c62df
commit 69647cc6a4
1 changed files with 7 additions and 1 deletions

View File

@ -2108,11 +2108,12 @@ void ami_get_msg(void)
ULONG winsignal = 1L << sport->mp_SigBit;
ULONG appsig = 1L << appport->mp_SigBit;
ULONG schedulesig = 1L << msgport->mp_SigBit;
ULONG ctrlcsig = SIGBREAKF_CTRL_C;
ULONG signal;
struct TimerRequest *timermsg = NULL;
struct MsgPort *printmsgport = ami_print_get_msgport();
ULONG printsig = 1L << printmsgport->mp_SigBit;
ULONG signalmask = winsignal | appsig | schedulesig | rxsig | printsig | applibsig;
ULONG signalmask = winsignal | appsig | schedulesig | rxsig | printsig | applibsig | ctrlcsig;
signal = Wait(signalmask);
/*
@ -2144,6 +2145,11 @@ printf("sig recvd %ld (%ld %ld %ld %ld %ld %ld)\n", signal, winsignal , appsig ,
schedule_run(FALSE);
}
}
if(signal & ctrlcsig)
{
ami_quit_netsurf();
}
}
void gui_poll(bool active)