[Issue 10395] New: [std.stdio] Closing a popened File with unread output throws an exception

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 17 15:29:59 PDT 2013


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

           Summary: [std.stdio] Closing a popened File with unread output
                    throws an exception
           Product: D
           Version: D2
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: code at dawg.eu


--- Comment #0 from Martin Nowak <code at dawg.eu> 2013-06-17 15:29:58 PDT ---
cat > bug.d << CODE
import std.stdio;

void main(string[] args)
{
    File file;
    file.popen("echo foobar");
    file.close();
}
CODE

dmd -run bug

------
std.exception.ErrnoException at std/stdio.d(480): Command returned 13 (Success)
------

I don't know why pclose returns 13.

NB:
The error message is wrong too. It should be EINVAL (13) not Success (0).

-- 
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