public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [RFC PATCH pmg-api 2/3] pmgpolicy: mimic Net::Server::PreForkSimple's signal handlers in child
Date: Wed, 10 Jun 2026 13:35:45 +0200	[thread overview]
Message-ID: <20260610113634.2172613-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20260610113634.2172613-1-d.csapak@proxmox.com>

In PreForkSimple's `run_child` method, some signal handlers are reset
that were copied over from the parent process. In pmgpolicy this method
gets overwritten and some handlers are overwritten like the default,
except SIGPIPE.

This shouldn't introduce any changes currently since it's set to IGNORE
in the parent already, but by mimicking the run_child behavior, we
protect against future changes when it might get set to something else
in the parent.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
sending as RFC because i'm currently not sure if it makes a difference
at all, but it seems like the correct approach, considering it's what
PreForkSimple also does.

 src/bin/pmgpolicy | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/pmgpolicy b/src/bin/pmgpolicy
index 31bffe7..e491d89 100755
--- a/src/bin/pmgpolicy
+++ b/src/bin/pmgpolicy
@@ -1003,6 +1003,7 @@ sub run_child {
     };
 
     $SIG{'CHLD'} = 'DEFAULT';
+    $SIG{'PIPE'} = 'IGNORE';
 
     delete $prop->{children};
 
-- 
2.47.3





  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 [PATCH pmg-api 1/3] pmgpolicy: fix failing run_command in children Dominik Csapak
2026-06-10 11:35 ` Dominik Csapak [this message]
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-2-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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal