nagios.cmd & SIGTERM

Jason Martin jhmartin at toger.us
Fri Feb 27 16:47:42 CET 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thank you for your reply. In looking at Nagios cvs, I see that
close_command_file() is also called on line 2631 of utils.c from within
sighandler().  I guess my question is why it is closed within the
sighandler. The sighandler sets the sigshutdown flag which causes main()to
call close_command_file() as well.  It struck me as being out of place
within the sighandler since it was already taken care of elsewhere.

Thanks,
- -Jason Martin


On Fri, 27 Feb 2004, Ethan Galstad wrote:

> You can find the calls to open_command_file() and 
> close_command_file() in main() in base/nagios.c.  There isn't really 
> a need to delete and recreate the command file when Nagios shuts down 
> and restarts - its just a carryover from a long time ago.  Nagios 2.0 
> attempts to reuse an already existing command file when it starts up.
> 
> 
> On 26 Feb 2004 at 9:13, Jason Martin wrote:
> 
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> > 
> > In looking at the signal handling procedure in Nagios 1.1, I see that
> > when a SIGTERM is caught, the function 'sighandler' almost immediately
> > closes the command file. It then returns and Nagios completes its
> > normal shutdown cycle, part of which is to remove the command file
> > again. I'm just curious - -- is there a necessity for the signal
> > handler to close the command file? 
> > 
> > Thanks,
> > - -Jason 
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.3.3 (GNU/Linux)
> > Comment: pgpenvelope 2.10.2 - http://pgpenvelope.sourceforge.net/
> > 
> > iD4DBQFAPilhl2ODWuqVSBMRAkt1AJdeS585ey6hFGWyvB0ea4OJHSeDAJ9cbAA0
> > kL1PR6YqrFAqE6uVH8lY/g==
> > =RZLm
> > -----END PGP SIGNATURE-----
> > 
> 
> 
> 
> Ethan Galstad,
> Nagios Developer
> ---
> Email: nagios at nagios.org
> Website: http://www.nagios.org
> 
> 
> 
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.3.3 (GNU/Linux)
Comment: pgpenvelope 2.10.2 - http://pgpenvelope.sourceforge.net/

iD8DBQFAP2aol2ODWuqVSBMRAqPUAJ0UJTWjp2JgGukqupWtvDs1tC47gACfVSDJ
QPGKZr/YCY0mvWBU1i1DQws=
=Ks0w
-----END PGP SIGNATURE-----


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click




More information about the Developers mailing list