summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2017-12-15 12:40:37 -0500
committerTavian Barnes <tavianator@tavianator.com>2017-12-15 12:40:37 -0500
commit7da0d28318c97f1f3d629f13daad9ec824254709 (patch)
tree565abff45b696b36a006f3ef1472f0db1425a11b /eval.c
parent7d419a51636161e0257c0ccf041b49b97fe5f219 (diff)
downloadbfs-7da0d28318c97f1f3d629f13daad9ec824254709.tar.xz
Keep track of required FDs per-expr
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) {