[Issue 3425] StdioException on end of stdin on Windows

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Oct 12 20:04:06 PDT 2011


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


Jay Norwood <jayn at prismnet.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jayn at prismnet.com


--- Comment #2 from Jay Norwood <jayn at prismnet.com> 2011-10-12 20:03:13 PDT ---
You can work around the issue by testing for eof  on the first line in the
loop. This works with no error.   

    foreach(elem; stdin.byLine()) {
        if (stdin.eof()) break;
        writeln(elem);
    }

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


More information about the Digitalmars-d-bugs mailing list