summaryrefslogtreecommitdiff
path: root/src/coredump
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-11-26 16:11:45 +0100
committerLennart Poettering <lennart@poettering.net>2018-12-01 12:50:45 +0100
commit0672e2c6f84e0999ead8ea662360eb6bb8effe4c (patch)
tree9431e15187526dfee77c1409934634b47e4e7925 /src/coredump
parent595225af7a4f663788d26b8720e994fed71f9410 (diff)
downloadsystemd-0672e2c6f84e0999ead8ea662360eb6bb8effe4c.tar.gz
tree-wide: use FORK_RLIMIT_NOFILE_SAFE wherever possible
Similar to the previous commit: in many cases no further fd processing needs to be done in forked of children before execve() or any of its flavours are called. In those case we can use FORK_RLIMIT_NOFILE_SAFE instead.
Diffstat (limited to 'src/coredump')
-rw-r--r--src/coredump/coredumpctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/coredump/coredumpctl.c b/src/coredump/coredumpctl.c
index de26bee931..8be7399b0c 100644
--- a/src/coredump/coredumpctl.c
+++ b/src/coredump/coredumpctl.c
@@ -968,7 +968,7 @@ static int run_debug(int argc, char **argv, void *userdata) {
fork_name = strjoina("(", arg_debugger, ")");
- r = safe_fork(fork_name, FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_CLOSE_ALL_FDS|FORK_LOG, &pid);
+ r = safe_fork(fork_name, FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_CLOSE_ALL_FDS|FORK_RLIMIT_NOFILE_SAFE|FORK_LOG, &pid);
if (r < 0)
goto finish;
if (r == 0) {