From 19d8170af342ee76f702403d413ac41bddfc26ce Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Tue, 24 Jan 2023 12:34:03 -0800 Subject: [PATCH] applets/pbot-vm: vm-server: fix child signal handler --- applets/pbot-vm/host/bin/vm-server | 6 +++--- lib/PBot/VERSION.pm | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/applets/pbot-vm/host/bin/vm-server b/applets/pbot-vm/host/bin/vm-server index f1be6a40..3f0b5cde 100755 --- a/applets/pbot-vm/host/bin/vm-server +++ b/applets/pbot-vm/host/bin/vm-server @@ -160,9 +160,6 @@ sub do_server() { sub handle_client($client, $heartbeat) { my ($timed_out, $killed) = (0, 0); - # we don't care about child exit status - local $SIG{CHLD} = 'IGNORE'; - my $r = fork; if (not defined $r) { @@ -241,6 +238,9 @@ sub handle_client($client, $heartbeat) { } sub main() { + # let OS clean-up child exits + $SIG{CHLD} = 'IGNORE'; + tie my $heartbeat, 'IPC::Shareable', { key => 'heartbeat', create => 1, destroy => 1 }; tie my $running, 'IPC::Shareable', { key => 'running', create => 1, destroy => 1 }; diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index b544368c..c6ee7ad9 100644 --- a/lib/PBot/VERSION.pm +++ b/lib/PBot/VERSION.pm @@ -25,8 +25,8 @@ use PBot::Imports; # These are set by the /misc/update_version script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 4604, - BUILD_DATE => "2023-01-23", + BUILD_REVISION => 4605, + BUILD_DATE => "2023-01-24", }; sub initialize {}