[syslog-ng]cannot get sec.pl to exit after syslog-ng does

syslog-ng@lists.balabit.hu syslog-ng@lists.balabit.hu
Mon, 3 May 2004 13:21:12 -0400

I am still unable to explain this.

After Bazsi's explanation on the correlation between syslog-ng, C, scheme
and lsh (it's not cryptic - my scheme is just a little rusty), I was able to
walk through the source and see that the pid and kill handler are registered
correctly in the resource list for the syslog-ng configuration. This means
all children should get a SIGTERM when syslog-ng gets a SIGTERM - just
before it exits the main loop. However, I am not observing this behavior.

Also, I don't see CONFIG_DESTROY being called on the old configuration when
the new configuration is reloaded, but I haven't walked through all that
source. I'm still getting familiar with all of this so excuse me if I don't
have everything straight.

FYI, I'm using the libol 0.3.13 package from sunfreeware.com (SUNWlibol) and
a custom complied syslog-ng 1.6.2 under Solaris 7.

Any additional insights / explanations would be helpful. Thanks.

"Computer science is as much about computers as 
        astronomy is about telescopes" -- Edsger Dijkstra 
Anthony Tonns, UNIX Administrator - atonns@mail.ivillage.com 


> -----Original Message-----
> From: Nate Campi [mailto:nate@campin.net] 
> Sent: Wednesday, April 28, 2004 10:06 PM
> To: syslog-ng@lists.balabit.hu
> Subject: Re: [syslog-ng]cannot get sec.pl to exit after syslog-ng does
> On Wed, Apr 28, 2004 at 02:58:47PM -0700, Nate Campi wrote:
> >
> > Ok. I don't know why mine is a child of syslog-ng, and it properly
> > terminates when syslog-ng does. We must not be on the same 
> version or
> > something. 1.5.26 here.
> I just fired up sec on a solaris 9 box:
> 9130  /usr/local/sbin/syslog-ng -f /etc/syslog-ng/syslog-ng.conf
>   16508 /bin/sh -c /usr/local/sbin/sec.pl -input="-" 
> -conf=/usr/local/etc/sec.conf
>     16509 /usr/bin/perl -w /usr/local/sbin/sec.pl -input=- 
> -conf=/usr/local/etc/sec.conf
> It isn't perl either, since starting a program with no arguments or
> redirection also gets started by a shell on solaris:
> 9130  /usr/local/sbin/syslog-ng -f /etc/syslog-ng/syslog-ng.conf
>   16508 /bin/sh -c /usr/local/sbin/sec.pl -input="-" 
> -conf=/usr/local/etc/sec.conf
>     16509 /usr/bin/perl -w /usr/local/sbin/sec.pl -input=- 
> -conf=/usr/local/etc/sec.conf
>   16616 /bin/sh -c /usr/local/bin/splogger
>     16617 /usr/local/bin/splogger
>   16618 /bin/sh -c /usr/local/sbin/sec.pl -input="-" 
> -conf=/usr/local/etc/sec.conf
>     16619 /usr/bin/perl -w /usr/local/sbin/sec.pl -input=- 
> -conf=/usr/local/etc/sec.conf
> Notice the two SEC's, I hupped syslog-ng when adding this:
> #---------------------------
> destination d_splogger {
>         program("/usr/local/bin/splogger");
> };
> # send all logs to splogger
> log {
>         source(src);
>         filter(f_not_brightmail);
>         destination(d_splogger);
> };
> #---------------------------
> So it's certainly different behavior on Linux and Solaris in 
> respect to
> starting child processes (syslog-ng 1.5.24 on Solaris).
> Bazsi can you explain what's going on here?
iVillage Inc., 500 Seventh Avenue, New York, NY 10018 -  iVillage Inc. is a
leading women's media company that includes iVillage.com, Women.com,
gURL.com, Astrology.com, Promotions.com, iVillage Parenting Network, The
Newborn Channel, Lamaze Publishing, Business Women's Network, Diversity Best
Practices, Best Practices in Corporate Communications, and iVillage
Consulting.  The information contained in this communication may be
confidential, is intended only for the use of the recipient named above, and
may be construed under applicable law to be a commercial email.  If you have
received this communication in error, please delete this message from your
computer system.  If you are the recipient named above and do not wish to
receive any future commercial emails, please reply to the sender with a
message stating such preference.