From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202410 header.b=RVdFgUzL; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id B14155A061A for ; Wed, 06 Nov 2024 04:03:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202410; t=1730862202; bh=HEtsDXwTRoA/xYk987EaOZuF/BYtsXWdBvkzrAyvySs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RVdFgUzLg8+5OyYN/80IwiU0tL+zY9LBLCR2s5MKERWaN2wO+AwShEpMNQkTZ/9B6 0m/KMgUmq9+47Ws0mJ3rLkQa3zyQZFAUmh0+rFNX0tHHaqKSOi2zIHUc9YnbA6Npn1 lOJEJpcmeqlXg6WvoU0vCrs350choZ5dOyzxe0Z4GOeko4eCQSGCmkjwJ3tvFjkOQw cMWRCRWMG5UL5OoJUvjMj8XB1QSSpXybZJf/F33nIQXN4ixgBPco7ktfGOwO0Mt0xd pgNSCt1EikDBLe72SnZja/aRH3JLAjybdIIokhjwsFuB7h3tl/enjXOSnjYzcIW+YQ V3ok0G3W4dagw== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4XjqlZ2Gqzz4x04; Wed, 6 Nov 2024 14:03:22 +1100 (AEDT) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH 1/2] test: Rename propagating signal handler Date: Wed, 6 Nov 2024 14:03:21 +1100 Message-ID: <20241106030322.2132051-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241106030322.2132051-1-david@gibson.dropbear.id.au> References: <20241106030322.2132051-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: E5HCHA7JJM3AQPIN5OSPUWYRXNVKGH5B X-Message-ID-Hash: E5HCHA7JJM3AQPIN5OSPUWYRXNVKGH5B X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: nstool in "exec" mode will propagate some signals (specifically SIGTERM) to the process in the namespace it executes. The signal handler which accomplishes this is called simply sig_handler(). However, it turns out we're going to need some other signal handlers, so rename this to the more specific sig_propagate(). Signed-off-by: David Gibson --- test/nstool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/nstool.c b/test/nstool.c index fc357d8..3f75edd 100644 --- a/test/nstool.c +++ b/test/nstool.c @@ -346,7 +346,7 @@ static int openns(const char *fmt, ...) } static pid_t sig_pid; -static void sig_handler(int signum) +static void sig_propagate(int signum) { int err; @@ -358,7 +358,7 @@ static void sig_handler(int signum) static void wait_for_child(pid_t pid) { struct sigaction sa = { - .sa_handler = sig_handler, + .sa_handler = sig_propagate, .sa_flags = SA_RESETHAND, }; int status, err; -- 2.47.0