diff options
author | Rob <rob.manea@gmail.com> | 2009-12-04 09:25:03 +0100 |
---|---|---|
committer | Rob <rob.manea@gmail.com> | 2009-12-04 09:25:03 +0100 |
commit | a9de45fd575cb47914b71ac23544a797b276cf3c (patch) | |
tree | 5848b325f9a9cfa0957615092c543350efa0c1a6 /uzbl-core.c | |
parent | 24d8b632eaa7e9622603fbd58cd4bc360f965dd8 (diff) |
generate a message on SIGSEGV
Diffstat (limited to 'uzbl-core.c')
-rw-r--r-- | uzbl-core.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/uzbl-core.c b/uzbl-core.c index 85330b9..42e274e 100644 --- a/uzbl-core.c +++ b/uzbl-core.c @@ -535,13 +535,17 @@ void catch_signal(int s) { if(s == SIGTERM || s == SIGINT || - s == SIGSEGV || s == SIGILL || s == SIGFPE || s == SIGQUIT) { clean_up(); exit(EXIT_SUCCESS); } + else if(s == SIGSEGV) { + clean_up(); + fprintf(stderr, "Program aborted, segmentation fault!\nAttempting to clean up...\n"); + exit(EXIT_FAILURE); + } else if(s == SIGALRM && uzbl.state.event_buffer) { g_ptr_array_free(uzbl.state.event_buffer, TRUE); uzbl.state.event_buffer = NULL; |