diff options
Diffstat (limited to 'sys-utils/unshare.c')
-rw-r--r-- | sys-utils/unshare.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys-utils/unshare.c b/sys-utils/unshare.c index 00afc7dd8..f26b148f7 100644 --- a/sys-utils/unshare.c +++ b/sys-utils/unshare.c @@ -446,9 +446,8 @@ int main(int argc, char *argv[]) } } - if (kill_child_signo != 0) - if (prctl(PR_SET_PDEATHSIG, kill_child_signo) < 0) - err(EXIT_FAILURE, "prctl failed"); + if (kill_child_signo != 0 && prctl(PR_SET_PDEATHSIG, kill_child_signo) < 0) + err(EXIT_FAILURE, "prctl failed"); if (maproot) { if (setgrpcmd == SETGROUPS_ALLOW) |