Re: [Nagios-devel] Nagios fails on empty config file

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Nagios fails on empty config file

Post by Guest »

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





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked