Remove chansrv_cleanup(), it doesn't do anything useful
xrdp_chansrv_%8.8x_main_term and xrdp_chansrv_%8.8x_thread_done are both wait objects, not sockets. They are created and cleaned up in chansrv.c Wait objects are pairs of file descriptors on POSIX. They are closed automatically when the process exits. On Windows, wait objects are handles that are closed by CloseHandle(). Those handles should also be closed on the process exit. In any case, there is no way for a parent process to clean up file handles of the child process.
This commit is contained in:
parent
a2d9272bc9
commit
fc2572f60b
@ -48,30 +48,6 @@ nil_signal_handler(int sig)
|
||||
g_writeln("xrdp-sessvc: nil_signal_handler: got signal %d", sig);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
/* chansrv can exit at any time without cleaning up, it's an xlib app */
|
||||
int
|
||||
chansrv_cleanup(int pid)
|
||||
{
|
||||
char text[256];
|
||||
|
||||
g_snprintf(text, 255, "/tmp/.xrdp/xrdp_chansrv_%8.8x_main_term", pid);
|
||||
|
||||
if (g_file_exist(text))
|
||||
{
|
||||
g_file_delete(text);
|
||||
}
|
||||
|
||||
g_snprintf(text, 255, "/tmp/.xrdp/xrdp_chansrv_%8.8x_thread_done", pid);
|
||||
|
||||
if (g_file_exist(text))
|
||||
{
|
||||
g_file_delete(text);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
@ -148,7 +124,6 @@ main(int argc, char **argv)
|
||||
g_sleep(1);
|
||||
}
|
||||
|
||||
chansrv_cleanup(chansrv_pid);
|
||||
/* kill X server */
|
||||
g_writeln("xrdp-sessvc: stopping X server");
|
||||
g_sigterm(x_pid);
|
||||
|
Loading…
Reference in New Issue
Block a user