Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-i can't read from a non-mmap-friendly input file when using --external #18

Closed
zacchiro opened this issue Nov 27, 2023 · 2 comments
Closed

Comments

@zacchiro
Copy link

It is handy to pass "streaming" content as input to build -i, e.g., by using shell process substitution like this: build -i <(zstdcat foo.txt.zst).

Unfortunately that does not work when --external is used.
Apparently in that case (and only in that case) the input file passed to -i is mmap-ed, which obviously fail when the input file is not a regular file (a FIFO, in the case of process substitution).

Would it be possible to either avoid mmap-ing the input file even when --external is used or, alternatively, to have an option to inhibit that selectively?

Thanks!

@jermp
Copy link
Owner

jermp commented Nov 28, 2023

Hi @zacchiro,
now it should be done, as of 0d09102.
Now, if you specify --external it does not use mmap anymore by default. To enable mmap, use --mmap.

Best,
-Giulio

@zacchiro
Copy link
Author

Confirmed, it works for me now. Thanks! Closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants