From 8f7deef03f716181d0ab937b31ba4b7391db31df Mon Sep 17 00:00:00 2001 From: Andreas Bachlechner <62039342+bachandi@users.noreply.github.com> Date: Wed, 23 Feb 2022 13:23:43 +0100 Subject: [PATCH] Updating the rrd needs to have the exculsive lock and emailreports do not need to have a lock as it just creates an cgi request which has its own lock. --- monitorix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/monitorix b/monitorix index 4b80f8c..beda540 100755 --- a/monitorix +++ b/monitorix @@ -769,7 +769,7 @@ while(1) { # call to all enabled graphs on every minute if($sec == 0) { my $lockfile_handler = lockfile_handler(\%config); - global_flock($lockfile_handler, LOCK_SH); + global_flock($lockfile_handler, LOCK_EX); foreach my $f (@{$config{func_update}}) { my $update = $f . "_update"; my $d = $f; @@ -832,7 +832,6 @@ while(1) { next; } - global_flock($lockfile_handler, LOCK_SH); # daily if(lc($emailreports->{daily}->{enabled} || "") eq "y") { eval { emailreports::emailreports_send(\%config, "daily", "1day", $d); }; @@ -870,7 +869,6 @@ while(1) { } } } - global_flock($lockfile_handler, LOCK_UN); } }