added chansrv_cleanup

ulab-original
jsorg71 15 years ago
parent e11dce79dc
commit 727012a56f

@ -49,6 +49,26 @@ nil_signal_handler(int sig)
g_writeln("xrdp-sessvc: nil_signal_handler: got signal %d", sig); g_writeln("xrdp-sessvc: nil_signal_handler: got signal %d", 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 int DEFAULT_CC
main(int argc, char** argv) main(int argc, char** argv)
@ -110,6 +130,7 @@ main(int argc, char** argv)
{ {
ret = g_waitpid(chansrv_pid); ret = g_waitpid(chansrv_pid);
} }
chansrv_cleanup(chansrv_pid);
/* kill X server */ /* kill X server */
g_writeln("xrdp-sessvc: stopping X server"); g_writeln("xrdp-sessvc: stopping X server");
g_sigterm(x_pid); g_sigterm(x_pid);

Loading…
Cancel
Save