Bug 11112 – Unable to execute shell commands in different threads
Status
RESOLVED
Resolution
FIXED
Severity
blocker
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Mac OS X
Creation time
2013-09-23T20:54:00Z
Last change time
2013-11-19T14:25:07Z
Keywords
pull
Assigned to
nobody
Creator
jm.niehus
Comments
Comment #0 by jm.niehus — 2013-09-23T20:54:11Z
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
Comment #1 by sludwig — 2013-09-24T00:28:01Z
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.
Comment #2 by hans — 2013-10-24T20:48:30Z
*** Issue 11341 has been marked as a duplicate of this issue. ***