[RFC] fork error in check.c

Hendrik BŠäcker andurin at process-zero.de
Sat Apr 12 18:35:35 CEST 2008


Hi List,

since memory eating ePN is enabled as default in Nagios 3 some users ran 
into fork error cause of memory limits, but no one told them.

They only see some log messages like: "Warning: The check of service xx 
could not be performed due to a fork() error."

I've spent some time on the code and would suggest attached patch.

Since the "fork_error" is only filled once in 
"run_async_service_check()", I guess it should be ok to move the logging 
earlier up to the fork error, so we could use strerror() to determine 
why the error occurs.
But I am not sure if the part:

if (fork_error == TRUE)
    return ERROR;

has to stand at the last lines of the function or if we are able to 
return quiet after the fork error.

It would be nice to see s.th. like sterror() in checks.c so that the 
users out there could imagine why an fork error occurs.

Regards,
Hendrik
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: checks.c.patch
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20080412/bed28580/attachment.ksh>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list