Re: elogd does not exit on SIGTERM, posted by Heiko Scheit on Fri Aug 27 00:49:27 2004
|
> Noee. Here it works immediately.
>
> Can you try with a fresh server from the distribution, with the example
> elogd.cfg, to see if there is any difference?
>
> The killing is handled in the funciton ctrlc_handler(), which sets _abort =
> TRUE. This is checked in line 16195, just after the select(), and the main
> loop is exited. The select finishes after one second, although I believe
> that the kill signal also terminates the select prematurely. The kill
> command and a Ctrl-C keystroke should work the same way, they both generate
> a SIGTERM or SIGINT signal.
elogd does not exit if there is an 'unprocessed' HUP. So when you do
kill -HUP <pid>
kill <pid>
elogd will only exit after it was accessed. |
Re: elogd does not exit on SIGTERM, posted by Stefan Ritt on Wed Sep 8 17:38:54 2004
|
> elogd does not exit if there is an 'unprocessed' HUP. So when you do
>
> kill -HUP <pid>
> kill <pid>
>
> elogd will only exit after it was accessed.
Can you please tell me how to reproduce this problem?
Even if I do a
kill -HUP <pid>; kill <pid>
it works immediately when I start elogd manually in interactive mode (not as daemon). |
Re: elogd does not exit on SIGTERM, posted by Heiko Scheit on Wed Sep 8 23:03:36 2004
|
> > elogd does not exit if there is an 'unprocessed' HUP. So when you do
> >
> > kill -HUP <pid>
> > kill <pid>
> >
> > elogd will only exit after it was accessed.
>
> Can you please tell me how to reproduce this problem?
>
> Even if I do a
>
> kill -HUP <pid>; kill <pid>
>
> it works immediately when I start elogd manually in interactive mode (not as daemon).
Even though I can't test this right now, I assume you have to wait a little
so that elogd jumps out of the 'select()' statement between the kill
commands. Try:
kill -HUP <pid>; sleep 2; kill <pid>
(I think the 'select()' timeout was 1 second.?) |
Re: elogd does not exit on SIGTERM, posted by Stefan Ritt on Thu Sep 9 21:40:47 2004
|
> kill -HUP <pid>; sleep 2; kill <pid>
Thanks, I could reproduce the problem. It had to do that a SIGHUP aborts the select()
command, which some listen socket marked, so that elogd goes into an accept() call, waiting
there indefinitely (or until a new browser request arrives). I fixed that. New version
under CVS. |
Re: elogd dies after receiving second SIGHUP, posted by Stefan Ritt on Mon Nov 17 10:27:23 2008
|
> elogd continues to run after a SIGHUP. If a second SIGHUP is received the daemon terminates.
> This was observed on Solaris 10 (SPARC).
> The documentation states that elogd should re-read configuration after receiving SIGHUP.
I tried to reproduce this but without success. I could send many SIGHUPs without the daemon terminating. Maybe
you modified the configuration file in between and elogd barked out because of some wrong configuration? Try to
start the daemon interactively and see what exactly happens if you send several SIGHUPs. |
Re: elogd dies after receiving second SIGHUP, posted by Paul T. Keener on Wed Jun 3 19:53:13 2009
|
> > elogd continues to run after a SIGHUP. If a second SIGHUP is received the daemon terminates.
> > This was observed on Solaris 10 (SPARC).
> > The documentation states that elogd should re-read configuration after receiving SIGHUP.
>
> I tried to reproduce this but without success. I could send many SIGHUPs without the daemon terminating. Maybe
> you modified the configuration file in between and elogd barked out because of some wrong configuration? Try to
> start the daemon interactively and see what exactly happens if you send several SIGHUPs.
The problem is that under Solaris signal handlers installed via signal() get uninstalled *before* the signal handler
is called. Thus the second time elogd receives a SIGHUP, you get the default action, which is to kill the process.
The solution is to use the POSIX sigaction() call instead of signal(). |
Re: elogd dies after receiving second SIGHUP, posted by Stefan Ritt on Thu Jun 4 09:49:13 2009
|
> > > elogd continues to run after a SIGHUP. If a second SIGHUP is received the daemon terminates.
> > > This was observed on Solaris 10 (SPARC).
> > > The documentation states that elogd should re-read configuration after receiving SIGHUP.
> >
> > I tried to reproduce this but without success. I could send many SIGHUPs without the daemon terminating. Maybe
> > you modified the configuration file in between and elogd barked out because of some wrong configuration? Try to
> > start the daemon interactively and see what exactly happens if you send several SIGHUPs.
>
> The problem is that under Solaris signal handlers installed via signal() get uninstalled *before* the signal handler
> is called. Thus the second time elogd receives a SIGHUP, you get the default action, which is to kill the process.
>
> The solution is to use the POSIX sigaction() call instead of signal().
Can you try to modify the signal() calls into sigaction(). If this really works under Solaris, I will incorporate this
then into the distribution. |
Re: elogd dies after receiving second SIGHUP, posted by Paul T. Keener on Thu Jun 4 18:49:29 2009
|
> > > > elogd continues to run after a SIGHUP. If a second SIGHUP is received the daemon terminates.
> > > > This was observed on Solaris 10 (SPARC).
> > > > The documentation states that elogd should re-read configuration after receiving SIGHUP.
> > >
> > > I tried to reproduce this but without success. I could send many SIGHUPs without the daemon terminating. Maybe
> > > you modified the configuration file in between and elogd barked out because of some wrong configuration? Try to
> > > start the daemon interactively and see what exactly happens if you send several SIGHUPs.
> >
> > The problem is that under Solaris signal handlers installed via signal() get uninstalled *before* the signal handler
> > is called. Thus the second time elogd receives a SIGHUP, you get the default action, which is to kill the process.
> >
> > The solution is to use the POSIX sigaction() call instead of signal().
>
> Can you try to modify the signal() calls into sigaction(). If this really works under Solaris, I will incorporate this
> then into the distribution.
Here is the patch. It works under both Solaris and Linux. |