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

           Summary: Mac OS 10.8 program crash
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Mac OS X
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Gary Willoughby <[email protected]> 2013-06-15 12:11:36 PDT 
---
Created an attachment (id=1226)
Sample crash log

The following code produces a program crash on Mac OS 10.8. Nothing is output
to the opened file and a crash is reported to /etc/log/system.log.

import core.sys.posix.unistd;
import std.c.stdlib;
import std.process;
import std.stdio;
import std.string;

int main(string[] args)
{
    pid_t pid = fork();
    if (pid < 0)
    {
        exit(EXIT_FAILURE);
    }

    if (pid > 0)
    {
        exit(EXIT_SUCCESS);
    }

    auto logFile = File("/Users/gary/Desktop/test.log", "a");
    logFile.writeln("Opened file");

    string command = format("logger -t %s %s", "hello", "This is a test");
    executeShell(command);

    logFile.writeln("Done");

    return 0;
}

See attached for sample crash log.

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

Reply via email to