mirror of
https://github.com/pragma-/pbot.git
synced 2025-05-05 14:17:33 +02:00
applets/pbot-vm: vm-server: fix child signal handler
This commit is contained in:
parent
de7db72c04
commit
19d8170af3
@ -160,9 +160,6 @@ sub do_server() {
|
|||||||
sub handle_client($client, $heartbeat) {
|
sub handle_client($client, $heartbeat) {
|
||||||
my ($timed_out, $killed) = (0, 0);
|
my ($timed_out, $killed) = (0, 0);
|
||||||
|
|
||||||
# we don't care about child exit status
|
|
||||||
local $SIG{CHLD} = 'IGNORE';
|
|
||||||
|
|
||||||
my $r = fork;
|
my $r = fork;
|
||||||
|
|
||||||
if (not defined $r) {
|
if (not defined $r) {
|
||||||
@ -241,6 +238,9 @@ sub handle_client($client, $heartbeat) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub main() {
|
sub main() {
|
||||||
|
# let OS clean-up child exits
|
||||||
|
$SIG{CHLD} = 'IGNORE';
|
||||||
|
|
||||||
tie my $heartbeat, 'IPC::Shareable', { key => 'heartbeat', create => 1, destroy => 1 };
|
tie my $heartbeat, 'IPC::Shareable', { key => 'heartbeat', create => 1, destroy => 1 };
|
||||||
tie my $running, 'IPC::Shareable', { key => 'running', create => 1, destroy => 1 };
|
tie my $running, 'IPC::Shareable', { key => 'running', create => 1, destroy => 1 };
|
||||||
|
|
||||||
|
@ -25,8 +25,8 @@ use PBot::Imports;
|
|||||||
# These are set by the /misc/update_version script
|
# These are set by the /misc/update_version script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 4604,
|
BUILD_REVISION => 4605,
|
||||||
BUILD_DATE => "2023-01-23",
|
BUILD_DATE => "2023-01-24",
|
||||||
};
|
};
|
||||||
|
|
||||||
sub initialize {}
|
sub initialize {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user