summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2020-03-29 11:01:25 +0200
committerYorhel <git@yorhel.nl>2020-03-29 11:01:25 +0200
commit4d8a59cc1dfb5f919298ee495b8865f7872f6cbb (patch)
treef25975815a4bcb632a4547b80d14e7f52d743fce
parent74aad378d49592df4359ea8a9f6f36d4a0013c04 (diff)
Add workaround for SIGCHLD bug in HTTP::Server::Simple
-rw-r--r--lib/TUWF.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/TUWF.pm b/lib/TUWF.pm
index 65ba6ce..5d7a517 100644
--- a/lib/TUWF.pm
+++ b/lib/TUWF.pm
@@ -330,6 +330,11 @@ sub _load_module {
sub _handle_request {
my $self = shift;
+ # HTTP::Server::Simple modifies SIGCHLD in a way that breaks every approach
+ # to spawning a subprocess. Let's reset SIGCHLD to fix that.
+ # https://rt.cpan.org/Public/Bug/Display.html?id=71045
+ local $SIG{CHLD} = undef if $OBJ->{_TUWF}{http};
+
my $start = [Time::HiRes::gettimeofday()] if $self->debug || $OBJ->{_TUWF}{log_slow_pages};
$self->{_TUWF}{captures_pos} = [];