diff options
author | jsorg71 <jsorg71> | 2009-09-04 19:20:40 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2009-09-04 19:20:40 +0000 |
commit | 727012a56f65fdeced100005887ad62698c0c759 (patch) | |
tree | 20b5cf751d185594afd1f625425ccb6514661d10 /sesman/sessvc | |
parent | e11dce79dc8708cd86a8917c16c16c9bf4beb45b (diff) | |
download | xrdp-proprietary-727012a56f65fdeced100005887ad62698c0c759.tar.gz xrdp-proprietary-727012a56f65fdeced100005887ad62698c0c759.zip |
added chansrv_cleanup
Diffstat (limited to 'sesman/sessvc')
-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); |