summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2017-11-12 15:16:23 -0500
committerTavian Barnes <tavianator@tavianator.com>2017-11-12 15:16:23 -0500
commitaf7878c7474de2f6c5542ad52a0a67237387c638 (patch)
tree0c94e29edc66302022f0bcc2829732cfb14cde6b /eval.c
parent6e9f52c9a8d51cac7db3b62e799fc32072c86443 (diff)
downloadbfs-af7878c7474de2f6c5542ad52a0a67237387c638.tar.xz
cmdline: Account for files opened during/between evaluations more carefully
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) {