Summary
"(read-string #f)" from console does not detect EOF correctly
Metadata
- Id: 2cde159fce91231afd25368daaf4e73f3095df2f
- Trac id: 915
- Type: defect
- Reporter: felix
- Owner: felix
- Cc: sjamaan
- Status: closed
- Component: unknown
- Estimated difficulty:
- Resolution: fixed
- Priority: major
- Milestone: 4.9.0
- Version: 4.8.x
- Changetime: 2012-09-29 19:40:03 UTC
- Created: 2012-09-06 09:25:25 UTC
- Keywords: read-string eof console
Attachments
- 2cde159fce91231afd25368daaf4e73f3095df2f/attachments/handle-eof-in-read-string.diff
Description
For example:
csi -e '(read-string #f)'
will read input forever and the input can not be terminated via C-d. Apparently `fast_read_string_from_file()` resets the EOF status (using `clearerr()`) which will continue reading when reading from the console.
Changes and comments
[2012-09-06 11:19:31 UTC] felix attached handle-eof-in-read-string.diff (description=Possible fix)
[2012-09-29 19:40:03 UTC] sjamaan changed status from new to closed
[2012-09-29 19:40:03 UTC] sjamaan set resolution to fixed
[2012-09-29 19:40:03 UTC] sjamaan wrote:
Fixed by 4e5ba39639abe206f2e8cf0e2a7647d00e759562