summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index d13b548..88616cc 100644
--- a/eval.c
+++ b/eval.c
@@ -1195,7 +1195,9 @@ static int infer_fdlimit(const struct cmdline *cmdline) {
closedir(dir);
}
- ret -= nopen + cmdline->persistent_fds + cmdline->ephemeral_fds;
+ ret -= nopen;
+ ret -= cmdline->expr->persistent_fds;
+ ret -= cmdline->expr->ephemeral_fds;
// bftw() needs at least 2 available fds
if (ret < 2) {