diff options
Diffstat (limited to 'sesman/sessvc/sessvc.c')
-rw-r--r-- | sesman/sessvc/sessvc.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sesman/sessvc/sessvc.c b/sesman/sessvc/sessvc.c index b5cbe4f0..29df1618 100644 --- a/sesman/sessvc/sessvc.c +++ b/sesman/sessvc/sessvc.c @@ -50,6 +50,26 @@ nil_signal_handler(int sig) } /******************************************************************************/ +/* chansrv can exit at any time without cleaning up, its an xlib app */ +int APP_CC +chansrv_cleanup(int pid) +{ + char text[256]; + + g_snprintf(text, 255, "xrdp_chansrv_%8.8x_main_term", pid); + if (g_file_exist(text)) + { + g_file_delete(text); + } + g_snprintf(text, 255, "xrdp_chansrv_%8.8x_thread_done", pid); + if (g_file_exist(text)) + { + g_file_delete(text); + } + return 0; +} + +/******************************************************************************/ int DEFAULT_CC main(int argc, char** argv) { @@ -110,6 +130,7 @@ main(int argc, char** argv) { ret = g_waitpid(chansrv_pid); } + chansrv_cleanup(chansrv_pid); /* kill X server */ g_writeln("xrdp-sessvc: stopping X server"); g_sigterm(x_pid); |