compositor: Stop trapping SIGQUIT 22/28022/1
authorMarius Vlad <marius.vlad@collabora.com>
Tue, 20 Sep 2022 08:45:09 +0000 (11:45 +0300)
committerMarius Vlad <marius.vlad@collabora.com>
Fri, 23 Sep 2022 15:15:11 +0000 (18:15 +0300)
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.

(Based on work from https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/817)

Bug-AGL: SPEC-4570

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Icf7d4f3e76a58e781bad911a966b65e2798266d0

src/compositor.c

index e03b860..dbc89e2 100644 (file)
@@ -1608,7 +1608,7 @@ int wet_main(int argc, char *argv[], const struct weston_testsuite_data *test_da
        char *cmdline;
        struct wl_display *display = NULL;
        struct wl_event_loop *loop;
-       struct wl_event_source *signals[3] = { 0 };
+       struct wl_event_source *signals[2] = { 0 };
        struct weston_config_section *section;
        /* Command line options */
        char *backend = NULL;
@@ -1709,8 +1709,6 @@ int wet_main(int argc, char *argv[], const struct weston_testsuite_data *test_da
                                              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);
 
        for (size_t i = 0; i < ARRAY_LENGTH(signals); ++i)
                if (!signals[i])