nagios.cmd & SIGTERM

Ethan Galstad nagios at
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:

> 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 
> Version: GnuPG v1.3.3 (GNU/Linux)
> Comment: pgpenvelope 2.10.2 -
> iD4DBQFAPilhl2ODWuqVSBMRAkt1AJdeS585ey6hFGWyvB0ea4OJHSeDAJ9cbAA0
> kL1PR6YqrFAqE6uVH8lY/g==
> =RZLm

Ethan Galstad,
Nagios Developer
Email: nagios at

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!

More information about the Developers mailing list