From 0672e2c6f84e0999ead8ea662360eb6bb8effe4c Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 26 Nov 2018 16:11:45 +0100 Subject: 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. --- src/delta/delta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/delta') diff --git a/src/delta/delta.c b/src/delta/delta.c index 328f5654e8..379226641e 100644 --- a/src/delta/delta.c +++ b/src/delta/delta.c @@ -169,7 +169,7 @@ static int found_override(const char *top, const char *bottom) { fflush(stdout); - r = safe_fork("(diff)", FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_CLOSE_ALL_FDS|FORK_LOG, &pid); + r = safe_fork("(diff)", FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_CLOSE_ALL_FDS|FORK_RLIMIT_NOFILE_SAFE|FORK_LOG, &pid); if (r < 0) return r; if (r == 0) { -- cgit v1.2.3