http://d.puremagic.com/issues/show_bug.cgi?id=8528

           Summary: std.stream.File believes /dev/stdin to be seekable
           Product: D
           Version: D2
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: lomerei...@gmail.com


--- Comment #0 from Artem Tarasov <lomerei...@gmail.com> 2012-08-09 09:24:38 
PDT ---
(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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to