[Nagios-devel] 2 calls to unlink in checkresults

Mathieu Gagné mgagne at iweb.com
Tue May 19 17:21:26 UTC 2009


On 5/19/09 5:01 AM, Andreas Ericsson wrote:
>> Since process_check_result_queue() has already loaded all checkresult
>> files in a list in memory (by calling add_check_result_to_list() in
>> process_check_result_file()), reap_check_results() shouldn't call
>> delete_check_result_file() at all.
>> Does it make any sense to you?
> Yes, but it seems unnecessarily complex. I think I'll revamp it so
> it's read once and deleted immediately after.

Here is a patch against Nagios 3.0.6 fixing the problem. 
delete_check_result_file() is now called from 
process_check_result_file() only.

Feel free to comment and/or improve it.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fix_multiple_calls_to_delete_check_result_file.patch
URL: <http://lists.nagios.com/pipermail/nagios-devel/attachments/20090519/e218108b/attachment.ksh>

More information about the Nagios-devel mailing list