From: Dominik Csapak <d.csapak@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [PATCH pmg-api 1/3] pmgpolicy: fix failing run_command in children
Date: Wed, 10 Jun 2026 13:35:44 +0200 [thread overview]
Message-ID: <20260610113634.2172613-1-d.csapak@proxmox.com> (raw)
Net::Server::PreForkSimple installs a handler for that in the parent
which reaps all children automatically with `waitpid(-1, ...)` and this
gets copied over on fork. Normally, the default `run_child` method sets
this back to the default, but in pmgpolicy that is overwritten and not
all signal handlers are set correctly.
This handler with its waitpid will be called before the one in
`run_command` which results in an error there.
To fix this, simply do what the default `run_child` does and set SIGCHLD
to 'DEFAULT'.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
src/bin/pmgpolicy | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/bin/pmgpolicy b/src/bin/pmgpolicy
index d7d440c..31bffe7 100755
--- a/src/bin/pmgpolicy
+++ b/src/bin/pmgpolicy
@@ -1002,6 +1002,8 @@ sub run_child {
exit;
};
+ $SIG{'CHLD'} = 'DEFAULT';
+
delete $prop->{children};
$self->child_init_hook;
--
2.47.3
next reply other threads:[~2026-06-10 11:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-10 11:35 Dominik Csapak [this message]
2026-06-10 11:35 ` [RFC PATCH pmg-api 2/3] pmgpolicy: mimic Net::Server::PreForkSimple's signal handlers in child Dominik Csapak
2026-06-10 11:35 ` [PATCH pmg-api 3/3] Revert "d/control: depend on proxmox-enterprise-support-keyring" Dominik Csapak
2026-06-10 11:37 ` Dominik Csapak
2026-06-10 12:28 ` applied: [PATCH pmg-api 1/3] pmgpolicy: fix failing run_command in children Stoiko Ivanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260610113634.2172613-1-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pmg-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox