diff options
author | Laxmikant Rashinkar <LK.Rashinkar@gmail.com> | 2013-09-03 19:44:20 -0700 |
---|---|---|
committer | Laxmikant Rashinkar <LK.Rashinkar@gmail.com> | 2013-09-03 19:44:20 -0700 |
commit | ece8f1fb47c584a63160fc2a339ebc015185f878 (patch) | |
tree | 6fbc6f9696c5db22ae5123d58f78730739207159 /sesman | |
parent | 829c494fb9b62c68d1079251ca1c97de84c09c70 (diff) | |
download | xrdp-proprietary-ece8f1fb47c584a63160fc2a339ebc015185f878.tar.gz xrdp-proprietary-ece8f1fb47c584a63160fc2a339ebc015185f878.zip |
gracefully handle segfaults in chansrv code
Diffstat (limited to 'sesman')
-rw-r--r-- | sesman/chansrv/chansrv.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sesman/chansrv/chansrv.c b/sesman/chansrv/chansrv.c index 26d4182e..d81c488d 100644 --- a/sesman/chansrv/chansrv.c +++ b/sesman/chansrv/chansrv.c @@ -1044,7 +1044,7 @@ child_signal_handler(int sig) { int i1; - LOG(10, ("child_signal_handler:")); + LOG(0, ("child_signal_handler:")); do { @@ -1061,6 +1061,14 @@ child_signal_handler(int sig) while (i1 >= 0); } +void DEFAULT_CC +segfault_signal_handler(int sig) +{ + LOG(0, ("segfault_signal_handler: entered.......")); + xfuse_deinit(); + exit(0); +} + /*****************************************************************************/ static int APP_CC get_display_num_from_display(char *display_text) @@ -1272,6 +1280,8 @@ main(int argc, char **argv) g_signal_user_interrupt(term_signal_handler); /* SIGINT */ g_signal_pipe(nil_signal_handler); /* SIGPIPE */ g_signal_child_stop(child_signal_handler); /* SIGCHLD */ + g_signal_segfault(segfault_signal_handler); + display_text = g_getenv("DISPLAY"); LOGM((LOG_LEVEL_INFO, "main: DISPLAY env var set to %s", display_text)); get_display_num_from_display(display_text); |