Nagios fails on empty config file

Marc Haber mh+nagios-devel at zugschlus.de
Wed Aug 23 11:10:11 CEST 2006


On Wed, Aug 23, 2006 at 11:04:32AM +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?

Yes, the issue is an _empty_ file.

> 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.

Sounds acceptable.

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 72739835

-------------------------------------------------------------------------
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




More information about the Developers mailing list