Nagios fails on empty config file
sean finney
seanius at seanius.net
Wed Aug 23 13:04:47 CEST 2006
On Wed, 2006-08-23 at 11:04 +0200, Andreas Ericsson wrote:
> Having investigated a bit further, it seems the mmap() call is the
> culprit in case the system doesn't support zero-length mmaps (many
> systems don't), in which case a simple "echo > config_file" would do the
> trick. Marc, can you verify if this is the case?
>
> The simplest solution in this case would be to just skip the mmap() step
> in case of zero-length files, as they're closed before real operations
> commence anyways, and I think it's safe to assume most systems can spare
> the 100 bytes or so of memory that are lost during the config reading.
i would second this suggestion. while from a development point of view
it might make sense to fail in this situation, it makes life very
difficult for packagers. also, since reading config files is a one-time
cost and the extra overhead of doing a stat+checking size seems minimal,
i don't see the harm in doing so.
sean
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20060823/13dbd91a/attachment.sig>
-------------- next part --------------
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
-------------- 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