summaryrefslogtreecommitdiffstats
path: root/src/vmspawn/vmspawn.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-01-12 15:57:13 +0100
committerLennart Poettering <lennart@poettering.net>2024-01-12 16:03:57 +0100
commit8b1835050347767dfec278175f633f956878cf1a (patch)
tree5464e7c15212a92cf06324364428741bc61aee43 /src/vmspawn/vmspawn.c
parentvmspawn: use our generic vsock CID parser, instead of a howngrown one (diff)
downloadsystemd-8b1835050347767dfec278175f633f956878cf1a.tar.xz
systemd-8b1835050347767dfec278175f633f956878cf1a.zip
vmspawn: use SD_EVENT_SIGNAL_PROCMASK flag where possible
Diffstat (limited to 'src/vmspawn/vmspawn.c')
-rw-r--r--src/vmspawn/vmspawn.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vmspawn/vmspawn.c b/src/vmspawn/vmspawn.c
index 2823c79225..5a69372b04 100644
--- a/src/vmspawn/vmspawn.c
+++ b/src/vmspawn/vmspawn.c
@@ -684,10 +684,10 @@ static int run_virtual_machine(void) {
}
/* shutdown qemu when we are shutdown */
- (void) sd_event_add_signal(event, NULL, SIGINT, on_orderly_shutdown, PID_TO_PTR(child_pid));
- (void) sd_event_add_signal(event, NULL, SIGTERM, on_orderly_shutdown, PID_TO_PTR(child_pid));
+ (void) sd_event_add_signal(event, NULL, SIGINT | SD_EVENT_SIGNAL_PROCMASK, on_orderly_shutdown, PID_TO_PTR(child_pid));
+ (void) sd_event_add_signal(event, NULL, SIGTERM | SD_EVENT_SIGNAL_PROCMASK, on_orderly_shutdown, PID_TO_PTR(child_pid));
- (void) sd_event_add_signal(event, NULL, SIGRTMIN+18, sigrtmin18_handler, NULL);
+ (void) sd_event_add_signal(event, NULL, (SIGRTMIN+18) | SD_EVENT_SIGNAL_PROCMASK, sigrtmin18_handler, NULL);
/* Exit when the child exits */
(void) sd_event_add_child(event, NULL, child_pid, WEXITED, on_child_exit, NULL);
@@ -748,7 +748,7 @@ static int run(int argc, char *argv[]) {
if (r < 0)
return r;
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, SIGTERM, SIGINT, SIGRTMIN+18, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, -1) >= 0);
return run_virtual_machine();
}