mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
fhem.pl: more careful $! evaluation after SIGTERM (Forum #127414)
git-svn-id: https://svn.fhem.de/fhem/trunk@25997 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3c41a23350
commit
be9c3f99f1
@ -723,6 +723,7 @@ while (1) {
|
||||
(!defined($timeout) || $timeout > $readytimeout));
|
||||
$timeout = 5 if $winService->{AsAService} && $timeout > 5;
|
||||
$nfound = select($rout=$rin, $wout=$win, $eout=$ein, $timeout) if(!$nfound);
|
||||
my $err = int($!);
|
||||
|
||||
$winService->{serviceCheck}->() if($winService->{serviceCheck});
|
||||
if($gotSig) {
|
||||
@ -733,7 +734,6 @@ while (1) {
|
||||
}
|
||||
|
||||
if($nfound < 0) {
|
||||
my $err = int($!);
|
||||
next if($err==0 || $err==4); # 4==EINTR
|
||||
|
||||
Log 1, "ERROR: Select error $nfound ($err), error count= $errcount";
|
||||
|
Loading…
Reference in New Issue
Block a user