Thread overview
[Issue 11112] New: Unable to execute shell commands in different threads
Sep 24, 2013
Joshua Niehus
Sep 24, 2013
Sönke Ludwig
Oct 25, 2013
Hans Fugal
September 24, 2013
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


--- Comment #0 from Joshua Niehus <jm.niehus@gmail.com> 2013-09-23 20:54:11 PDT ---
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: -------
September 24, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11112


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

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


--- Comment #1 from Sönke Ludwig <sludwig@outerproduct.org> 2013-09-24 00:28:01 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: -------
October 25, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11112


Hans Fugal <hans@fugal.net> changed:

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


--- Comment #2 from Hans Fugal <hans@fugal.net> 2013-10-24 20:48:30 PDT ---
*** 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: -------