-
-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
interp: test and fix
read
with regular files as stdin
This worked on v3.8.0, but was broken by v3.9.0 starting to use the cancelreader library to support cancellable reads from standard input. The use of cancelreader works OK for stdin files being OS pipes, but it does not work for stdin files which are regular files on Linux, as regular files on Linux are always ready for reading and do not support polling or cancelling in any way. As such, if cancelreader fails to create a cancellable reader, fall back to reading directly from the file without cancellation. This approach is not ideal, so leave a TODO to improve it with some form of new API proposed upstream. Thanks to Andrew Imeson for reporting the bug, providing multiple test cases which reproduced it, and doing a git bisect as well. Fixes #1099.
- Loading branch information
Showing
2 changed files
with
38 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters