www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11112] New: Unable to execute shell commands in different threads

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11112

           Summary: Unable to execute shell commands in different threads
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Mac OS X
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: jm.niehus gmail.com



---
The following produces a seg fault:

//---
module test;

import std.stdio
     , std.concurrency
     , std.process;

void spawnedFunc(Tid tid) {
    receive(
        (int i) {
            "hello?".writeln;
            executeShell("ls -a").output.writeln;
        }
    );
    send(tid, true);
}

void main() {
    auto tid = spawn(&spawnedFunc, thisTid);
    send(tid, 42);
    auto wasSuccessful = receiveOnly!(bool);
    writeln("Successfully executed shell.");
}
//---

System info:
OSX 10.8.5
intel i7 3.4 GHz
16 GB RAM

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 23 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11112


Sönke Ludwig <sludwig outerproduct.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sludwig outerproduct.org



PDT ---
See also the original thread in the DUB forum for a little additional
information:
http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub/thread/195/

There it seems to crash also in the main thread under certain circumstances.
From the first look it gives the impression that the module constructor isn't
called.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 24 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11112


Hans Fugal <hans fugal.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hans fugal.net



*** Issue 11341 has been marked as a duplicate of this issue. ***

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