From: Mike Yuan Date: Fri, 19 Dec 2025 22:26:49 +0000 (+0100) Subject: process-util: dedup restore_sigsetp() with block_signals_reset() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e48e098db1b4b4e4711a47c55b1c49f6c119936f;p=thirdparty%2Fsystemd.git process-util: dedup restore_sigsetp() with block_signals_reset() --- diff --git a/src/basic/process-util.c b/src/basic/process-util.c index 31dbdff87a2..50fa34c2e5d 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c @@ -1484,11 +1484,6 @@ pid_t clone_with_nested_stack(int (*fn)(void *), int flags, void *userdata) { return pid; } -static void restore_sigsetp(sigset_t **ssp) { - if (*ssp) - (void) sigprocmask(SIG_SETMASK, *ssp, NULL); -} - static int fork_flags_to_signal(ForkFlags flags) { return (flags & FORK_DEATHSIG_SIGTERM) ? SIGTERM : (flags & FORK_DEATHSIG_SIGINT) ? SIGINT : @@ -1505,7 +1500,7 @@ int pidref_safe_fork_full( pid_t original_pid, pid; sigset_t saved_ss, ss; - _unused_ _cleanup_(restore_sigsetp) sigset_t *saved_ssp = NULL; + _unused_ _cleanup_(block_signals_reset) sigset_t *saved_ssp = NULL; bool block_signals = false, block_all = false, intermediary = false; _cleanup_close_pair_ int pidref_transport_fds[2] = EBADF_PAIR; int prio, r;