@@ -1934,7 +1934,13 @@ main(int argc, char **argv)
1934
1934
return 1 ;
1935
1935
}
1936
1936
1937
- /* set up signal handler */
1937
+ /* set up signal objects */
1938
+ g_snprintf (text , sizeof (text ), "xrdp_chansrv_%8.8x_main_term" , pid );
1939
+ g_term_event = g_create_wait_obj (text );
1940
+ g_snprintf (text , sizeof (text ), "xrdp_chansrv_%8.8x_sigchld" , pid );
1941
+ g_sigchld_event = g_create_wait_obj (text );
1942
+
1943
+ /* set up signal handlers */
1938
1944
g_signal_terminate (term_signal_handler ); /* SIGTERM */
1939
1945
g_signal_user_interrupt (term_signal_handler ); /* SIGINT */
1940
1946
g_signal_pipe (nil_signal_handler ); /* SIGPIPE */
@@ -1945,18 +1951,17 @@ main(int argc, char **argv)
1945
1951
xcommon_set_x_server_fatal_handler (x_server_fatal_handler );
1946
1952
1947
1953
LOG_DEVEL (LOG_LEVEL_INFO , "main: DISPLAY env var set to %s" , display_text );
1948
-
1949
1954
LOG_DEVEL (LOG_LEVEL_INFO , "main: using DISPLAY %d" , g_display_num );
1950
- g_snprintf (text , 255 , "xrdp_chansrv_%8.8x_main_term" , pid );
1951
- g_term_event = g_create_wait_obj (text );
1952
- g_snprintf (text , 255 , "xrdp_chansrv_%8.8x_sigchld" , pid );
1953
- g_sigchld_event = g_create_wait_obj (text );
1954
- g_snprintf (text , 255 , "xrdp_chansrv_%8.8x_thread_done" , pid );
1955
- g_thread_done_event = g_create_wait_obj (text );
1956
- g_snprintf (text , 255 , "xrdp_chansrv_%8.8x_exec" , pid );
1955
+
1956
+ /* Set up RAIL sync objects */
1957
+ g_snprintf (text , sizeof (text ), "xrdp_chansrv_%8.8x_exec" , pid );
1957
1958
g_exec_event = g_create_wait_obj (text );
1958
1959
g_exec_mutex = tc_mutex_create ();
1959
1960
g_exec_sem = tc_sem_create (0 );
1961
+
1962
+ /* Set up the channel thread */
1963
+ g_snprintf (text , sizeof (text ), "xrdp_chansrv_%8.8x_thread_done" , pid );
1964
+ g_thread_done_event = g_create_wait_obj (text );
1960
1965
tc_thread_create (channel_thread_loop , 0 );
1961
1966
1962
1967
while (g_term_event > 0 && !g_is_wait_obj_set (g_term_event ))
0 commit comments