On Sunday, September 23, 2012 01:12:34 Andrej Mitrovic wrote:
> On 9/23/12, Peter Sommerfeld <[email protected]> wrote:
> > What is wrong here?
> 
>   string[] cmd;
>   cmd ~= "dmd";
>   cmd ~= "src/xyz.d";
>   int i = execvp("dmd",cmd);
> 
> 1st arg should always be the app name, even though apps typically
> ignore/skip the first arg.

Are you sure about that? That seems pretty messed up if that's the case. Yes, 
the first element in the argument list that main gets is the name of the 
program, but it's pretty messed up if any of the exec* functions require that 
you give the program name as the first argument rather than it being 
appropriately added by that program before its main is called. I'd be very 
surprised if you were correct about this.

- Jonathan M Davis

Reply via email to