ndo2db patches for error conditions

Ton Voon ton.voon at altinity.com
Wed Mar 5 10:59:32 CET 2008


Hi Ethan,

Attached are two patches that we've applied to our copy of ndoutils  
1.4b3 (these also apply cleanup on version 1.4b7).


RETRY ON SOFT READ ERRORS

It was possible that if a read() error occurred with errno==EAGAIN or  
EINTR, that the code would continue processing with result=-1. This  
could cause segfaults as a 0 byte is then attempted to be placed into  
buf[-1].

This patch will loop back over the read() call for those soft errors.


REMOVE MULTIPLE CHILDREN

We haven't found exactly which circumstances cause this (maybe the  
above?), but we occasionally find defunct ndo2db processes. These  
don't get reaped properly as each SIGCHLD call only reaps a single  
child. The patch loops around the waitpit() until there are no more  
children to reap.


Can you evaluate for inclusion into the next release of ndoutils?


Ton

http://www.altinity.com
UK: +44 (0)870 787 9243
US: +1 866 879 9184
Fax: +44 (0)845 280 1725
Skype: tonvoon

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ndoutils_retry_on_soft_read_errors.patch
Type: application/octet-stream
Size: 690 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20080305/071eefa0/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ndoutils_remove_multiple_children.patch
Type: application/octet-stream
Size: 662 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20080305/071eefa0/attachment-0001.obj>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-------------- 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