avoid 100% cpu usage, die when PID file cannot be created

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@3702 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
markusbloch
2013-08-15 09:57:35 +00:00
parent 6725864ff6
commit 5f59fe9560

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