www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8528] New: std.stream.File believes /dev/stdin to be seekable

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: nobody puremagic.com
        ReportedBy: lomereiter gmail.com



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: -------
Aug 09 2012