summaryrefslogtreecommitdiffstats
path: root/sesman/sig.c
diff options
context:
space:
mode:
authorilsimo <ilsimo>2008-02-20 22:02:24 +0000
committerilsimo <ilsimo>2008-02-20 22:02:24 +0000
commit4c9d3862e55ab5d6fa734549478bb0a00be9f7ed (patch)
tree2efde9a8872ed90ea14521702614768aaf0b765b /sesman/sig.c
parent8f0045c19b03d5c9a0baea6b72037ec226db8343 (diff)
downloadxrdp-proprietary-4c9d3862e55ab5d6fa734549478bb0a00be9f7ed.tar.gz
xrdp-proprietary-4c9d3862e55ab5d6fa734549478bb0a00be9f7ed.zip
updating logging subsystem
Diffstat (limited to 'sesman/sig.c')
-rw-r--r--sesman/sig.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/sesman/sig.c b/sesman/sig.c
index 2f67a18f..8f37e767 100644
--- a/sesman/sig.c
+++ b/sesman/sig.c
@@ -37,7 +37,7 @@ extern struct config_sesman g_cfg;
void DEFAULT_CC
sig_sesman_shutdown(int sig)
{
- log_message(LOG_LEVEL_INFO, "shutting down sesman %d", 1);
+ log_message(&(g_cfg.log), LOG_LEVEL_INFO, "shutting down sesman %d", 1);
if (g_getpid() != g_pid)
{
@@ -60,22 +60,23 @@ sig_sesman_reload_cfg(int sig)
{
struct config_sesman cfg;
- log_message(LOG_LEVEL_WARNING, "receiving SIGHUP %d", 1);
+#warning FIXME reload configuration must NOT damage logging!
+ log_message(&(g_cfg.log), LOG_LEVEL_WARNING, "receiving SIGHUP %d", 1);
if (g_getpid() != g_pid)
{
- LOG_DBG("g_getpid() [%d] differs from g_pid [%d]", g_getpid(), g_pid);
+ LOG_DBG(&(g_cfg.log), "g_getpid() [%d] differs from g_pid [%d]", g_getpid(), g_pid);
return;
}
if (config_read(&cfg) != 0)
{
- log_message(LOG_LEVEL_ERROR, "error reading config - keeping old cfg");
+ log_message(&(g_cfg.log), LOG_LEVEL_ERROR, "error reading config - keeping old cfg");
return;
}
g_cfg = cfg;
- log_message(LOG_LEVEL_INFO, "configuration reloaded");
+ log_message(&(g_cfg.log), LOG_LEVEL_INFO, "configuration reloaded");
}
/******************************************************************************/
@@ -121,19 +122,20 @@ sig_handler_thread(void* arg)
do
{
- LOG_DBG("calling sigwait()",0);
+ LOG_DBG(&(g_cfg.log), "calling sigwait()",0);
sigwait(&waitmask, &recv_signal);
switch (recv_signal)
{
case SIGHUP:
//reload cfg
- LOG_DBG("sesman received SIGHUP",0);
+ //we must stop & restart logging, or copy logging cfg!!!!
+ LOG_DBG(&(g_cfg.log), "sesman received SIGHUP",0);
//return 0;
break;
case SIGCHLD:
/* a session died */
- LOG_DBG("sesman received SIGCHLD",0);
+ LOG_DBG(&(g_cfg.log), "sesman received SIGCHLD",0);
sig_sesman_session_end(SIGCHLD);
break;
/*case SIGKILL;
@@ -143,7 +145,7 @@ sig_handler_thread(void* arg)
break;*/
case SIGTERM:
/* we die */
- LOG_DBG("sesman received SIGTERM",0);
+ LOG_DBG(&(g_cfg.log), "sesman received SIGTERM",0);
sig_sesman_shutdown(recv_signal);
break;
}