summaryrefslogtreecommitdiffstats
path: root/syslogd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-12-14 17:58:12 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-12-14 17:58:12 +0000
commite45bbf5c66b5cb08c91bdb99ba1acf5f215c3112 (patch)
tree60d91c5ece80f8025a44484d674dbdcc3825faaa /syslogd.c
parent8d186b303650c1d942543e28fdf8cf28a451f438 (diff)
downloadrsyslog-e45bbf5c66b5cb08c91bdb99ba1acf5f215c3112.tar.gz
rsyslog-e45bbf5c66b5cb08c91bdb99ba1acf5f215c3112.tar.xz
rsyslog-e45bbf5c66b5cb08c91bdb99ba1acf5f215c3112.zip
graceful termination now supported
Diffstat (limited to 'syslogd.c')
-rw-r--r--syslogd.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/syslogd.c b/syslogd.c
index a0e43587..53874f46 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -4246,7 +4246,7 @@ startInputModules(void)
while(pMod != NULL) {
/* activate here */
dbgprintf("thread creating...\n");
- thrdCreate(pMod->mod.im.runInput);
+ thrdCreate(pMod->mod.im.runInput, pMod->mod.im.eTermSyncType);
pMod = modGetNxtType(pMod, eMOD_IN);
}
@@ -5323,7 +5323,8 @@ int decode(uchar *name, struct code *codetab)
}
extern void dbgprintf(char *fmt, ...) __attribute__((format(printf,1, 2)));
-void dbgprintf(char *fmt, ...)
+void
+dbgprintf(char *fmt, ...)
{
static int bWasNL = FALSE;
va_list ap;
@@ -5342,7 +5343,7 @@ void dbgprintf(char *fmt, ...)
* rgerhards, 2007-06-15
*/
if(bWasNL) {
- fprintf(stdout, "%8.8d: ", (unsigned int) pthread_self());
+ fprintf(stdout, "%8.8x: ", (unsigned int) pthread_self());
}
bWasNL = (*(fmt + strlen(fmt) - 1) == '\n') ? TRUE : FALSE;
va_start(ap, fmt);
@@ -6118,10 +6119,6 @@ static void mainThread()
mainloop();
}
-static void sigusr2Dummy(int sig)
-{
-dbgprintf("sigusr2Dummy called!\n");
-}
/* This is the main entry point into rsyslogd. Over time, we should try to
* modularize it a bit more...
@@ -6395,8 +6392,6 @@ int main(int argc, char **argv)
sigaction(SIGALRM, &sigAct, NULL);
sigAct.sa_handler = Debug ? debug_switch : SIG_IGN;
sigaction(SIGUSR1, &sigAct, NULL);
- sigAct.sa_handler = sigusr2Dummy;
- sigaction(SIGUSR2, &sigAct, NULL);
sigAct.sa_handler = SIG_IGN;
sigaction(SIGPIPE, &sigAct, NULL);
sigaction(SIGXFSZ, &sigAct, NULL); /* do not abort if 2gig file limit is hit */