diff options
author | jsorg71 <jsorg71> | 2008-12-26 02:20:03 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2008-12-26 02:20:03 +0000 |
commit | 23fe2e2259d1348110b0ba20af13ac523c3ab849 (patch) | |
tree | 506e3e553aad02d6ddd1b3bc9abed285939122b9 /sesman/sig.c | |
parent | 12b2ea66fc67b7980267e915b553f3250041c09a (diff) | |
download | xrdp-proprietary-23fe2e2259d1348110b0ba20af13ac523c3ab849.tar.gz xrdp-proprietary-23fe2e2259d1348110b0ba20af13ac523c3ab849.zip |
added g_ to globals, added SIGINT, SIGKILL to shutdown signals, other minor changes
Diffstat (limited to 'sesman/sig.c')
-rw-r--r-- | sesman/sig.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/sesman/sig.c b/sesman/sig.c index cc4a2eb6..806e9b8f 100644 --- a/sesman/sig.c +++ b/sesman/sig.c @@ -123,6 +123,9 @@ sig_handler_thread(void* arg) sigaddset(&waitmask, SIGHUP); sigaddset(&waitmask, SIGCHLD); sigaddset(&waitmask, SIGTERM); + sigaddset(&waitmask, SIGKILL); + sigaddset(&waitmask, SIGINT); + // sigaddset(&waitmask, SIGFPE); // sigaddset(&waitmask, SIGILL); // sigaddset(&waitmask, SIGSEGV); @@ -131,28 +134,32 @@ sig_handler_thread(void* arg) { LOG_DBG(&(g_cfg->log), "calling sigwait()",0); sigwait(&waitmask, &recv_signal); - switch (recv_signal) { case SIGHUP: //reload cfg //we must stop & restart logging, or copy logging cfg!!!! - LOG_DBG(&(g_cfg->log), "sesman received SIGHUP",0); + LOG_DBG(&(g_cfg->log), "sesman received SIGHUP", 0); //return 0; break; case SIGCHLD: /* a session died */ - LOG_DBG(&(g_cfg->log), "sesman received SIGCHLD",0); + LOG_DBG(&(g_cfg->log), "sesman received SIGCHLD", 0); sig_sesman_session_end(SIGCHLD); break; - /*case SIGKILL; - / * we die * / - LOG_DBG("sesman received SIGKILL",0); + case SIGINT: + /* we die */ + LOG_DBG(&(g_cfg->log), "sesman received SIGINT", 0); + sig_sesman_shutdown(recv_signal); + break; + case SIGKILL: + /* we die */ + LOG_DBG(&(g_cfg->log), "sesman received SIGKILL", 0); sig_sesman_shutdown(recv_signal); - break;*/ + break; case SIGTERM: /* we die */ - LOG_DBG(&(g_cfg->log), "sesman received SIGTERM",0); + LOG_DBG(&(g_cfg->log), "sesman received SIGTERM", 0); sig_sesman_shutdown(recv_signal); break; } @@ -160,4 +167,3 @@ sig_handler_thread(void* arg) return 0; } - |