summaryrefslogtreecommitdiffstats
path: root/src/basic/process-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/process-util.c')
-rw-r--r--src/basic/process-util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/process-util.c b/src/basic/process-util.c
index 8cb229ca09..f6ecc7f86f 100644
--- a/src/basic/process-util.c
+++ b/src/basic/process-util.c
@@ -1301,8 +1301,8 @@ int safe_fork_full(
r, "Failed to rename process, ignoring: %m");
}
- if (flags & FORK_DEATHSIG)
- if (prctl(PR_SET_PDEATHSIG, SIGTERM) < 0) {
+ if (flags & (FORK_DEATHSIG|FORK_DEATHSIG_SIGINT))
+ if (prctl(PR_SET_PDEATHSIG, (flags & FORK_DEATHSIG_SIGINT) ? SIGINT : SIGTERM) < 0) {
log_full_errno(prio, errno, "Failed to set death signal: %m");
_exit(EXIT_FAILURE);
}