aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2024-11-06 14:03:21 +1100
committerStefano Brivio <sbrivio@redhat.com>2024-11-07 12:47:27 +0100
commitb456ee1b53171c46b6f25c1c43d9fc17f6116745 (patch)
tree11df85281466d44e8b62e5a4c166c3c814fae0fa
parent867db07fcfc24d0918fa92f98e26fc8f9bf40253 (diff)
downloadpasst-b456ee1b53171c46b6f25c1c43d9fc17f6116745.tar
passt-b456ee1b53171c46b6f25c1c43d9fc17f6116745.tar.gz
passt-b456ee1b53171c46b6f25c1c43d9fc17f6116745.tar.bz2
passt-b456ee1b53171c46b6f25c1c43d9fc17f6116745.tar.lz
passt-b456ee1b53171c46b6f25c1c43d9fc17f6116745.tar.xz
passt-b456ee1b53171c46b6f25c1c43d9fc17f6116745.tar.zst
passt-b456ee1b53171c46b6f25c1c43d9fc17f6116745.zip
test: Rename propagating signal handler
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 <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--test/nstool.c4
1 files 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;