From 2ada996f95e67f484f28e995cae16e66ce69ed24 Mon Sep 17 00:00:00 2001 From: Georg Hofmann Date: Mon, 1 Apr 2019 11:40:37 +0200 Subject: [PATCH] Fix bug where the main loop sleeps forever. On some system the alarm & pause sequence breaks with high system loads. --- monitorix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/monitorix b/monitorix index 788dfab..05e55fb 100755 --- a/monitorix +++ b/monitorix @@ -737,9 +737,8 @@ logger("Ok, ready."); # main loop while(1) { - local $SIG{'ALRM'} = sub { }; - alarm(1); - pause(); + + select undef, undef, undef, 1.0; my ($sec, $min, $hour, $mday, $mon, undef, $wday) = localtime(time);