[Issue 4368] New: Fork() on OS X 2.047 results in a core.thread.ThreadException

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 22 16:12:49 PDT 2010


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

           Summary: Fork() on OS X 2.047 results in a
                    core.thread.ThreadException
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: druntime
        AssignedTo: sean at invisibleduck.org
        ReportedBy: bheads at emich.edu


--- Comment #0 from Byron Heads <bheads at emich.edu> 2010-06-22 16:12:46 PDT ---
import  core.sys.posix.unistd,
        std.stdio;

void main() 
{
    auto pid = fork();

    if( pid > 0 ) {
        writeln( "Parent" );
    } else if( pid == 0 ) {
        writeln( "Child" );
    } else {
        writeln( "Failed to fork!" );
    }
}


$ ./fork
Parent
Child
core.thread.ThreadException: Unable to load thread state
----------------
5   fork                                0x00006e0d thread_suspendAll + 85
6   fork                                0x0000b014
D2gc3gcx3Gcx11fullcollectMFPvZk + 32
7   fork                                0x0000afe1
D2gc3gcx3Gcx16fullcollectshellMFZk + 41
8   fork                                0x0000a0c6
D2gc3gcx2GC18fullCollectNoStackMFZv + 54
9   fork                                0x00008060 gc_term + 44
10  fork                                0x0000cf1a
D2rt6dmain24mainUiPPaZi6runAllMFZv + 90
11  fork                                0x0000cdea
D2rt6dmain24mainUiPPaZi7tryExecMFMDFZvZv + 42
12  fork                                0x0000cd78 main + 168
13  fork                                0x00001acd start + 53halle109-82:dbug
admin$

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