summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index fe89225..1c9ae50 100644
--- a/eval.c
+++ b/eval.c
@@ -1191,8 +1191,7 @@ static int infer_fdlimit(const struct cmdline *cmdline) {
closedir(dir);
}
- // 1 extra fd needed by -empty
- ret -= nopen + 1;
+ ret -= nopen + cmdline->persistent_fds + cmdline->ephemeral_fds;
// bftw() needs at least 2 available fds
if (ret < 2) {