nagios.cmd & SIGTERM

Ethan Galstad nagios at nagios.org
Fri Feb 27 07:01:39 CET 2004


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




More information about the Developers mailing list