starting child pid

corey taylor corey.taylor@gmail.com
Thu Apr 14 01:19:00 GMT 2005


zippo,

  You should post those kinds of questions to a place like Experts
Exchange: http://www.experts-exchange.com/Programming/Programming_Platforms/Linux_Programming/

corey

On 4/13/05, zippo <zippo752001@comcast.net> wrote:
> I am writeing a toolbar program, so when you click the icon it starts a program. I got it working somewhat but was wondering the best way to start the program. I am useing something to the  following
> 
> pid_t pid;
> 
>   char *my_args[0];
>          my_args[0] = NULL;
> 
> pid = fork();
> 
> if (pid == 0)
> {
>         execvp("Path/to/prog", my_args);
> }
> 
> is that proper? or is there a better way todo it? or am i going about it all wrong, any help would be great. Jason
>



More information about the Gcc-help mailing list