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 9301756fdb
commit 9dbe8d3ddb

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";
close PIDFILE;
@@ -380,7 +380,7 @@ local $SIG{HUP} = sub {$nextrun = gettimeofday();};
}
}
sleep 0.1;
}
}
}