using std.process

BCS none at anon.com
Fri Jun 11 21:33:16 PDT 2010


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><





More information about the Digitalmars-d-learn mailing list