[syslog-ng] syslog-ng 1.3.15 compile fails on FreeBSD 3.2R

George Madden gmadden@columbus.rr.com
Fri, 18 Feb 2000 09:22:38 -0500


Balazs,

For some reason the patch fails. I didn't investigate why, I just edited
main.c. I recompliled after applying the patches for afile.c and main.c. It
seems to work fine now. I can do a HUP and it restarts. I'll let it run for
a while and watch it.

Thanks for all your help on this.
-George


----- Original Message -----
From: Balazs Scheidler <bazsi@balabit.hu>
To: <syslog-ng@venus.terrasoft.hu>
Sent: Thursday, February 17, 2000 3:15 PM
Subject: Re: [syslog-ng] syslog-ng 1.3.15 compile fails on FreeBSD 3.2R


> On Wed, Feb 16, 2000 at 03:47:47PM -0500, George Madden wrote:
> > I applied the patch and it complied fine. This box is a heavy logger
(about
> > 4000 messages a minute). I installed 1.3.15 and tried to do a kill -HUP
and
> > it fails. It stops writing to the log files after the HUP but the
process is
> > still alive. It can't bind to the socket after the HUP. Here's the
output
> > when I run with -v -d options.
> >
> > Objects alive: 240, garbage collected: 6
> > SIGHUP received, restarting syslog-ng
> > Marking fd 3 for closing.
>
> try this patch:
>
> Index: main.c
> ===================================================================
> RCS file: /home/bazsi/cvs/syslog-ng/src/main.c,v
> retrieving revision 1.24
> diff -u -r1.24 main.c
> --- main.c 2000/02/13 16:45:14 1.24
> +++ main.c 2000/02/17 20:08:32
> @@ -60,7 +60,7 @@
>
>   switch (self->state) {
>   case 0:
> - case 2:
> + case 3:
>   self->backend->persistent = make_persistent_config();
>   CONFIG_DESTROY(self->backend->configuration, self->backend->persistent);
>   self->state++;
> @@ -69,6 +69,10 @@
>   io_callout(&self->backend->super, 0, c);
>   break;
>   case 1:
> + self->state++;
> + io_callout(&self->backend->super, 0, c);
> + break;
> + case 2:
>   if (CONFIG_INIT(self->backend->configuration,
self->backend->persistent)) {
>   notice("new configuration initialized\n");
>   self->backend->newconfig = NULL;
> @@ -87,7 +91,7 @@
>
>   }
>   break;
> - case 3:
> + case 4:
>   if (CONFIG_INIT(self->backend->configuration,
self->backend->persistent)) {
>   notice("Initializing new configuration failed, reverting to old
config.\n");
>   }
> @@ -156,6 +160,7 @@
>   if (backend->newconfig) {
>   static struct reread_config r =
>   { { STATIC_HEADER, do_reread_config }, NULL, 0 };
> +
>   r.backend = backend;
>   r.state = 0;
>   io_callout(&backend->super, 0, &r.super);
>
>
> --
> Bazsi
> PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C
8EB1
>      url: http://www.balabit.hu/pgpkey.txt
>
> _______________________________________________
> syslog-ng maillist  -  syslog-ng@lists.balabit.hu
> http://lists.balabit.hu/mailman/listinfo/syslog-ng