2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-13 17:26: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:
markusbloch 2013-08-15 09:57:35 +00:00
parent 542da29e80
commit ef98b2bc1d

View File

@ -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;
} }
} }
} }