mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-12 22:56:34 +00:00
avoid 100% cpu usage, die when PID file cannot be created
git-svn-id: https://svn.fhem.de/fhem/trunk@3702 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
542da29e80
commit
ef98b2bc1d
@ -118,7 +118,7 @@ if($opt_h)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
open(PIDFILE, ">$opt_P");
|
open(PIDFILE, ">$opt_P") or die("Could not open PID file $opt_P: $!");
|
||||||
print PIDFILE $$."\n";
|
print PIDFILE $$."\n";
|
||||||
close PIDFILE;
|
close PIDFILE;
|
||||||
|
|
||||||
@ -380,7 +380,7 @@ local $SIG{HUP} = sub {$nextrun = gettimeofday();};
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sleep 0.1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user