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>
(cherry picked from commit c1f03709580a146b9acdf5aca514fe4bc4b9c384)
This commit is contained in:
Alberto Garcia 2022-10-06 14:24:56 +02:00 committed by Simon McVittie
parent a6b431b1c0
commit 2dad36ede6

View File

@ -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