diff options
Diffstat (limited to 'source/a/elogind/5d16d94aa9a5e3afe5b51f591497149630763b24.patch')
-rw-r--r-- | source/a/elogind/5d16d94aa9a5e3afe5b51f591497149630763b24.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/source/a/elogind/5d16d94aa9a5e3afe5b51f591497149630763b24.patch b/source/a/elogind/5d16d94aa9a5e3afe5b51f591497149630763b24.patch new file mode 100644 index 000000000..fe7940fff --- /dev/null +++ b/source/a/elogind/5d16d94aa9a5e3afe5b51f591497149630763b24.patch @@ -0,0 +1,39 @@ +From 5d16d94aa9a5e3afe5b51f591497149630763b24 Mon Sep 17 00:00:00 2001 +From: Sven Eden <sven@eden-worx.com> +Date: Mon, 22 Apr 2024 08:31:30 +0200 +Subject: [PATCH] SIGCHLD handler: Check sleep_fork_action against NULL + +Signed-off-by: Sven Eden <sven@eden-worx.com> +--- + src/login/elogind.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/login/elogind.c b/src/login/elogind.c +index e616b8088e..b47540352f 100644 +--- a/src/login/elogind.c ++++ b/src/login/elogind.c +@@ -81,6 +81,7 @@ static int elogind_sigchld_handler( + sd_event_source* s, + const struct signalfd_siginfo* si, + void* userdata ) { ++ const HandleActionData* a; + Manager* m = userdata; + int r, status; + +@@ -97,13 +98,14 @@ static int elogind_sigchld_handler( + + /* The sleep forker PID is always "the outer one", so wait for it second. */ + if ( m->sleep_fork_pid > 0 ) { ++ a = m->sleep_fork_action; + waitpid(m->sleep_fork_pid, &status, WNOHANG | WUNTRACED); + log_debug_elogind( "sleep_fork PID %d waitpid() set status %d", m->sleep_fork_pid, status ); + if ( WIFEXITED(status) || WIFSIGNALED(status) ) + m->sleep_fork_pid = 0; + /* Tell people that they now may take a lock again */ +- if ( m->sleep_fork_action->sleep_operation != _SLEEP_OPERATION_INVALID ) { +- (void) send_prepare_for( m, m->sleep_fork_action, false ); ++ if ( a && a->sleep_operation != _SLEEP_OPERATION_INVALID ) { ++ (void) send_prepare_for( m, a, false ); + m->sleep_fork_action = NULL; /* All done */ + } + } |