David Simcha <> changed:

           What    |Removed                     |Added
            Summary|std.stdio.File does not     |StdioException on end of
                   |properly handle EOF from    |stdin on Windows
                   |stdin on Windows            |
           Severity|normal                      |major

--- Comment #1 from David Simcha <> 2011-03-09 20:41:02 PST ---
I've managed to figure out where this exception is coming from, but I don't
know how to fix it because I don't know why errno is getting set.  It's on line
2271 in stdio.d:

    if (fp._flag & _IONBF)
        /* Use this for unbuffered I/O, when running
         * across buffer boundaries, or for any but the common
         * cases.
        auto app = appender(buf);
        if(app.capacity == 0)
            app.reserve(128); // get at least 128 bytes available

        int c;
        while((c = FGETC(fp)) != -1) {
            app.put(cast(char) c);
            if(c == terminator) {
                buf =;
                return buf.length;


        if (ferror(fps))

Can we **PLEASE** fix this one ASAP?  It's been in Bugzilla for over a year and
a half and makes it impossible to write simple text filter programs on Windows
without ugly and/or unsafe workarounds.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to