aboutsummaryrefslogtreecommitdiff
path: root/sysutils/roottail/files/patch-aa
blob: 2ae41937a887555f1f2be3a8be9acd7b01f98051 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- root-tail.c.orig	Wed May  8 22:54:47 2002
+++ root-tail.c	Sun Mar 16 10:41:37 2003
@@ -86,6 +86,7 @@
 void list_files(int);
 void force_reopen(int);
 void force_refresh(int);
+void exit_now(int);
 void blank_window(int);
 
 void InitWindow(void);
@@ -128,6 +129,12 @@
     redraw();
 }
 
+void exit_now(int signal)
+{
+    fprintf (stderr, "Program exiting due to signal: %d\n", signal);
+    exit(-1);
+}
+
 void blank_window(int dummy)
 {
     XClearWindow(disp, root);
@@ -685,6 +692,7 @@
     install_signal(SIGHUP, force_reopen);
     install_signal(SIGUSR1, list_files);
     install_signal(SIGUSR2, force_refresh);
+    install_signal(SIGSEGV, exit_now);
 
     if (opt_daemonize)
 	daemonize();