Bug 8528 – std.stream.File believes /dev/stdin to be seekable

Status
RESOLVED
Resolution
WONTFIX
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
Linux
Creation time
2012-08-09T09:24:00Z
Last change time
2016-10-15T17:27:26Z
Assigned to
nobody
Creator
lomereiter

Comments

Comment #0 by lomereiter — 2012-08-09T09:24:38Z
(I'm aware that std.stream will be replaced but anyway...) If I access stdin like this, seekable flag is set: new std.stream.File("/dev/stdin"); // seekable = true A workaround is to use std.stdio.File: auto g0 = std.stdio.File("/dev/stdin"); auto g = new std.stream.File(g0.fileno, FileMode.In); // seekable = false