void DEFAULT_CC stop_signal_handler(int sig) { log_message(&log_conf, LOG_LEVEL_DEBUG, "chansrv[stop_signal_handler]: " "signal_handler: got signal %d", sig); g_waitchild(); }
void DEFAULT_CC sig_sesman_session_end(int sig) { int pid; if (g_getpid() != g_pid) { return; } pid = g_waitchild(); if (pid > 0) { session_kill(pid); } }
void DEFAULT_CC child_signal_handler(int sig) { int pid; LOG(0, ("child_signal_handler:")); do { pid = g_waitchild(); LOG(0, ("child_signal_handler: child pid %d", pid)); if ((pid == g_exec_pid) && (pid > 0)) { LOG(0, ("child_signal_handler: found pid %d", pid)); //shutdownx(); } } while (pid >= 0); }
void DEFAULT_CC child_signal_handler(int sig) { int i1; LOG(10, ("child_signal_handler:")); do { i1 = g_waitchild(); if (i1 == g_exec_pid) { LOG(0, ("child_signal_handler: found pid %d", i1)); //shutdownx(); } LOG(10, (" %d", i1)); } while (i1 >= 0); }
THREAD_RV THREAD_CC monit_thread(void* param) { lock_stopwait_acquire(); while (stop == 0) { g_sleep(g_cfg->sess.monitoring_delay); while (g_waitchild() > 0); lock_chain_acquire(); session_monit(); lock_chain_release(); } session_sigkill_all(); log_message(&(g_cfg->log), LOG_LEVEL_DEBUG, "sesman[monit_thread]: remove XRDP temp dir"); g_remove_dirs(XRDP_TEMP_DIR); g_snprintf(pid_file, 255, "%s/xrdp-sesman.pid", XRDP_PID_PATH); g_file_delete(pid_file); lock_stopwait_release(); }
void xrdp_child(int sig) { g_waitchild(); }