Hello Graham,
On Fri, 11 Jun 2010 19:09:04 +0000, Philippe Sigaud wrote:
OK, this is a real newbie question:
How can I use std.process?
when I do:
import std.process;
void main() {
execvp("mkdir", ["test"]);
}
nothing happens.
What am I doing wrong?
I'm on Vista there, didn't try the equivalent under Linux.
Try giving an absolute path to 'mkdir'. I'm fairly sure that the exec*
family does not use the PATH environment.
That's what the 'p' in 'vp' stand for: path.
OTOH I don't remember if the exec's tack on the exe name to the args so you
might need to do:
execvp("mkdir",["mkdir","test"]);
--
... <IXOYE><