Make sockets non-blocking
Stephen Gran
steve at lobefin.net
Sat May 1 18:03:59 CEST 2010
Hi there,
We use NDO for network communication with a custom bit of perl to pass
status updates around. Recently, we've seen that a network flap can
make ndo hang the entire nagios process, which is possibly imperfect :)
I think I've tracked it down to the write() call in io.c when sending
the actual update to the remote server. The attached patch is a
relatively naive attempt at making this write nonblocking for network
sockets.
This is a patch against the CVS - if you prefer a git-am style patch,
that's fine. I tried to clone the git off of sourceforge this morning,
and got an empty repo. If there's a better place to clone from, let me
know and I'll fix it up for that.
Cheers,
--
--------------------------------------------------------------------------
| Stephen Gran | You have a will that can be influenced |
| steve at lobefin.net | by all with whom you come in contact. |
| http://www.lobefin.net/~steve | |
--------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ndoutils-nonblock-socket.patch
Type: text/x-diff
Size: 580 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20100501/2b0012d3/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20100501/2b0012d3/attachment.sig>
-------------- next part --------------
------------------------------------------------------------------------------
-------------- 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