From 2f71b3c3deae1fbed60165624b538b891debf085 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Mon, 11 Apr 2022 08:22:31 -0500 Subject: [PATCH] compositor: Stop trapping SIGQUIT We've been trapping SIGQUIT for a "clean shutdown" since commit 3cad436a However, sources such as: http://www.gnu.org/software/libc/manual/html_node/Termination-Signals.html indicate we probably shouldn't be trapping it at all, as the intent of SIGQUIT is to leave a core file and debug artifacts from the run. We should perform the minimal amount of clean up to ensure the system isn't left in an unusable state - but these days that's performed by other software such as logind. We can safely stop trapping SIGQUIT entirely. Signed-off-by: Derek Foreman --- compositor/main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/compositor/main.c b/compositor/main.c index 56de28d0..62a7c48b 100644 --- a/compositor/main.c +++ b/compositor/main.c @@ -3181,7 +3181,7 @@ wet_main(int argc, char *argv[], const struct weston_testsuite_data *test_data) int ret = EXIT_FAILURE; char *cmdline; struct wl_display *display; - struct wl_event_source *signals[4]; + struct wl_event_source *signals[3]; struct wl_event_loop *loop; int i, fd; char *backend = NULL; @@ -3303,14 +3303,12 @@ wet_main(int argc, char *argv[], const struct weston_testsuite_data *test_data) display); signals[1] = wl_event_loop_add_signal(loop, SIGINT, on_term_signal, display); - signals[2] = wl_event_loop_add_signal(loop, SIGQUIT, on_term_signal, - display); wl_list_init(&wet.child_process_list); - signals[3] = wl_event_loop_add_signal(loop, SIGCHLD, sigchld_handler, + signals[2] = wl_event_loop_add_signal(loop, SIGCHLD, sigchld_handler, &wet); - if (!signals[0] || !signals[1] || !signals[2] || !signals[3]) + if (!signals[0] || !signals[1] || !signals[2]) goto out_signals; /* Xwayland uses SIGUSR1 for communicating with weston. Since some