summaryrefslogtreecommitdiffstats
path: root/tools/syslogd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-10-07 10:53:05 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-10-07 10:53:05 +0200
commit92ec206279e29d12d3d44e51280485d641579e41 (patch)
tree7b8f3c0216f67f7a34c119d27bd9ad9bf339f87b /tools/syslogd.c
parentcaeb203f5188aafccc667c1afc42a49df80d0747 (diff)
downloadrsyslog-92ec206279e29d12d3d44e51280485d641579e41.tar.gz
rsyslog-92ec206279e29d12d3d44e51280485d641579e41.tar.xz
rsyslog-92ec206279e29d12d3d44e51280485d641579e41.zip
bugfix and testbench improvement
made shutdown more reliable by makeing sure that the main queue DA worker is only cancelled if this is actually unavoidable. Also moved down the deletion of rsyslogd's pid file to immediately before termination, so that absence of the file is a proper indication that rsyslogd has finished (in the past, e.g. the testbench accidently ran two intances as the pid file was deleted too early). Also some improvments to the testbench, namely to handle aborts more intelligently (but still not perfect).
Diffstat (limited to 'tools/syslogd.c')
-rw-r--r--tools/syslogd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/syslogd.c b/tools/syslogd.c
index bd2d107f..3350804d 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -1733,8 +1733,6 @@ die(int sig)
*/
tplDeleteAll();
- remove_pid(PidFile);
-
/* de-init some modules */
modExitIminternal();
@@ -1768,6 +1766,9 @@ die(int sig)
*/
freeAllDynMemForTermination();
/* NO CODE HERE - feeelAllDynMemForTermination() must be the last thing before exit()! */
+
+ remove_pid(PidFile);
+
exit(0); /* "good" exit, this is the terminator function for rsyslog [die()] */
}