2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

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

git-svn-id: https://svn.fhem.de/fhem/trunk@11072 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2016-03-16 07:54:42 +00:00
parent e01db84f15
commit 9f200fa8a1

View File

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