diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2012-12-07 23:35:57 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2012-12-07 23:35:57 +0000 |
commit | 69647cc6a4f230fc0c1ce5481a30ac21c93db8d2 (patch) | |
tree | 9f222f777f483462eea84f143bcaa187d6621a5e | |
parent | 04825c62df92c8adef3f40f89c7b5d88b963f833 (diff) | |
download | netsurf-69647cc6a4f230fc0c1ce5481a30ac21c93db8d2.tar.gz netsurf-69647cc6a4f230fc0c1ce5481a30ac21c93db8d2.tar.bz2 |
Respond to Ctrl-C by immediately quitting. TCP/IP stack exit expects this.
-rwxr-xr-x | amiga/gui.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/amiga/gui.c b/amiga/gui.c index a1a9468f0..47d75bcd0 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -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) |