diff options
author | Alberto Garcia <berto@igalia.com> | 2022-10-06 14:24:56 +0200 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2022-10-06 13:48:31 +0100 |
commit | c1f03709580a146b9acdf5aca514fe4bc4b9c384 (patch) | |
tree | e99a4796d57a97e66302b71edf66c9523c81d4f5 | |
parent | a88d97179263bf4e1b2458b26c6953d7e0004a9f (diff) | |
download | flatpak-c1f03709580a146b9acdf5aca514fe4bc4b9c384.tar.gz |
session-helper: Run default signal handler after handle_sigterm()
Exiting the process with a custom exit status (1) after systemctl stop
(SIGTERM) makes systemd treat the flatpak-session-helper service as if
it had failed.
Signed-off-by: Alberto Garcia <berto@igalia.com>
-rw-r--r-- | session-helper/flatpak-session-helper.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/session-helper/flatpak-session-helper.c b/session-helper/flatpak-session-helper.c index 64e81f69..50ee0439 100644 --- a/session-helper/flatpak-session-helper.c +++ b/session-helper/flatpak-session-helper.c @@ -49,8 +49,11 @@ do_atexit (void) static void handle_sigterm (int signum) { + struct sigaction action = { 0 }; do_atexit (); - _exit (1); + action.sa_handler = SIG_DFL; + sigaction (signum, &action, NULL); + raise (signum); } typedef struct |