fhem.pl: set SIGCHLD to default after fork (Forum #50898)

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@11072 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2016-03-16 07:54:42 +00:00
parent a42ea0d822
commit efe6853b5e

View File

@@ -4470,9 +4470,7 @@ fhemFork()
return $pid if($pid);
# Child here
# Close all kind of FD. Reasons:
# - cannot restart FHEM if child keeps TCP Serverports open
# ...?
# Close FDs as we cannot restart FHEM if child keeps TCP Serverports open
foreach my $d (sort keys %defs) {
my $h = $defs{$d};
$h->{DBH}->{InactiveDestroy} = 1 if($h->{TYPE} eq 'DbLog');
@@ -4482,6 +4480,7 @@ fhemFork()
DevIo_CloseDev($h,1);
}
}
$SIG{CHLD} = 'DEFAULT'; # Forum #50898
return 0;
}