summaryrefslogtreecommitdiffstats
path: root/sesman/sessvc/sessvc.c
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2009-09-04 19:20:40 +0000
committerjsorg71 <jsorg71>2009-09-04 19:20:40 +0000
commit727012a56f65fdeced100005887ad62698c0c759 (patch)
tree20b5cf751d185594afd1f625425ccb6514661d10 /sesman/sessvc/sessvc.c
parente11dce79dc8708cd86a8917c16c16c9bf4beb45b (diff)
downloadxrdp-proprietary-727012a56f65fdeced100005887ad62698c0c759.tar.gz
xrdp-proprietary-727012a56f65fdeced100005887ad62698c0c759.zip
added chansrv_cleanup
Diffstat (limited to 'sesman/sessvc/sessvc.c')
-rw-r--r--sesman/sessvc/sessvc.c21
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);