Multiple Nagios proccesses running.

Andreas Ericsson ae at op5.se
Thu Aug 11 11:47:33 CEST 2005


Chris Wilson wrote:
> Hi Andreas,
> 
> 
>>Patch really attached this time.
> 
> 
> Any comments on this second patch?
> 

Actually, I do.

Rather than exiting if it finds a process running with the same pid, it 
should try and kill it (using SIGTERM, sleeping 5 seconds and then 
issuing SIGKILL). This is because we can't be sure WHAT process it 
found, just that it has the same pid as the one that used to be nagios, 
and on a restart attempt where the previous daemon failed to exit the 
logical thing to do is to re-read the configuration. This is ofcourse 
assuming we are checking the pid as non-root (I assume we are, as you 
include EPERM in your exception handling). Oherwise we might be killing 
apache, postfix or some other system service that's supposed to be running.

There are also C++ style comments which need to be removed, and Ethan 
won't accept it unless you un-wrap all the lines.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list