Hi, I've just committed a fix to make a one second window smaller while syslog-ng reloads itself. It should be available in snapshots later than 2005-01-21 (YYYY-MM-DD), or alternatively here is the patch:
Index: syslog-ng/ChangeLog diff -u syslog-ng/ChangeLog:1.80.4.22 syslog-ng/ChangeLog:1.80.4.23 --- syslog-ng/ChangeLog:1.80.4.22 Thu Nov 18 12:44:12 2004 +++ syslog-ng/ChangeLog Thu Jan 20 18:30:16 2005 @@ -1,3 +1,12 @@ +2005-01-20 Balazs Scheidler <[EMAIL PROTECTED]> + + * src/main.c: fix possible log message losing during HUP as + syslog-ng was not accepting messages for 1 second and these + messages were dropped, processing changed so we still wait 1 + second to flush buffers but also accept messages in this interval, + so the window of losing messages becomes much smaller. (fixes: + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=282771) + 2004-11-18 Balazs Scheidler <[EMAIL PROTECTED]> * src/main.c (main): some platform seems to require that a tzset() Index: syslog-ng/src/main.c diff -u syslog-ng/src/main.c:1.49.4.1 syslog-ng/src/main.c:1.49.4.2 --- syslog-ng/src/main.c:1.49.4.1 Thu Nov 18 12:44:12 2004 +++ syslog-ng/src/main.c Thu Jan 20 18:30:17 2005 @@ -69,6 +69,7 @@ switch (self->state) { case -1: + self->backend->super.reloading = 1; self->state++; break; case 0: @@ -205,7 +206,8 @@ CONFIG_DESTROY(backend->configuration, 0); break; } - if (reload_config) { + if (reload_config && r.state == 0) { + /* reload initiated and callout started by SIGHUP finished, e.g. r.state == 0 */ backend->newconfig = make_syslog_config(cfgfilename, &backend->super); if (backend->newconfig) { @@ -235,7 +237,7 @@ } if (sighuprecvd) { sighuprecvd = 0; - if (!backend->super.reloading) { + if (!backend->super.reloading && !reload_config) { #if HAVE_RES_INIT res_init(); #endif @@ -244,7 +246,6 @@ set_error_stream(2, 0); set_internal_cfg(NULL); } - backend->super.reloading = 1; reload_config = 1; r.backend = backend; r.state = -1; -- Bazsi -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]