using std.process

Philippe Sigaud philippe.sigaud at gmail.com
Sat Jun 12 06:44:01 PDT 2010


Graham

> Try giving an absolute path to 'mkdir'. I'm fairly sure that the exec*
>> family does not use the PATH environment.
>>
>
>
I tried the different versions and used execvp precisely because it's
supposed to provide the path. But I admit I never tried giving it an entire
path.


BCS:

> 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"]);
>

Because arg #0 is the name of the exec itself?

***


Ok, I tried your suggestions and obtained some results. Right now, I can
even make dmd compile some simple file, like this:

execvp("dmd", ["dmd", "test.d"];

It doesn't do anything with just

execvp("dmd", ["test.d"]);

Now, my goal is to activate the dot executable from graphviz
( http://www.graphviz.org )

and... it works if I use

execvp("dot", ["dot",  /* arg lis */]);
 thank to you both!

strangely, it takes 22s to produce the pdf, as opposed to about 3s at the
command line...
I think initially, I stopped it before it could finish its work.


Philippe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20100612/58aee247/attachment-0001.html>


More information about the Digitalmars-d-learn mailing list