diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2009-05-16 14:45:16 +0200 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2009-05-16 14:45:16 +0200 |
commit | 64a4f8d02c1e6900b8b46a7b3fd5bd5232e3b685 (patch) | |
tree | 3f9867ff46ffef42b21b00738adcc8dee2fc0cb8 /uzbl.c | |
parent | 67160e8918ddca8792db46be96e11ce45896df98 (diff) |
catch sigINT
Diffstat (limited to 'uzbl.c')
-rw-r--r-- | uzbl.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -181,6 +181,13 @@ catch_sigterm(int s) { clean_up(); } +static void +catch_sigint(int s) { + (void) s; + clean_up(); + exit(EXIT_SUCCESS); +} + /* --- CALLBACKS --- */ static gboolean @@ -1573,6 +1580,8 @@ main (int argc, char* argv[]) { if(setup_signal(SIGTERM, catch_sigterm) == SIG_ERR) fprintf(stderr, "uzbl: error hooking SIGTERM\n"); + if(setup_signal(SIGINT, catch_sigint) == SIG_ERR) + fprintf(stderr, "uzbl: error hooking SIGINT\n"); if(uname(&uzbl.state.unameinfo) == -1) g_printerr("Can't retrieve unameinfo. Your useragent might appear wrong.\n"); |