shell doesn't throw on error. Is that a regression?

timotheecour thelastmammoth at gmail.com
Sat Feb 2 18:07:24 PST 2013


The doc for std.process.shell says "If the process could not be 
started or exits with an error code, throws an exception."

However on OSX I'm having a different kind of behavior.
Isn't there a unittest to test this?

---
import std.process;
import std.stdio;

void main(){
	shell("asfasfasdfasdf");
	writeln("ok");
}
---
prints:

in dmd.2.061 - 2.059:
sh: asfasfasdfasdf: command not found
ok

in dmd.2.057:
sh: asfasfasdfasdf: command not found
std.exception.ErrnoException at std/stdio.d(418): Could not close 
pipe `asfasfasdfasdf' (Undefined error: 0)


More information about the Digitalmars-d-learn mailing list