mirror of https://github.com/mikaku/Monitorix.git
Fix bug where the main loop sleeps forever.
On some system the alarm & pause sequence breaks with high system loads.
This commit is contained in:
parent
792c8be362
commit
2ada996f95
|
@ -737,9 +737,8 @@ logger("Ok, ready.");
|
||||||
|
|
||||||
# main loop
|
# main loop
|
||||||
while(1) {
|
while(1) {
|
||||||
local $SIG{'ALRM'} = sub { };
|
|
||||||
alarm(1);
|
select undef, undef, undef, 1.0;
|
||||||
pause();
|
|
||||||
|
|
||||||
my ($sec, $min, $hour, $mday, $mon, undef, $wday) = localtime(time);
|
my ($sec, $min, $hour, $mday, $mon, undef, $wday) = localtime(time);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue