josuealcalde
July 21st, 2005, 03:03 PM
I want to launch a compress file manager (for example, file-roller, but could be other) into another. Both are guis to see some file:
GtkWidget *statusbox;
switch(fork())
{
case -1:
//Throw a warning dialog
...
case 0:
printf("En <0>\n");fflush(stdout);
char * arg[3];
strcpy(arg[0], "file-roller");
strcpy(arg[1], _package->getFile().c_str()); //The file param for file roller
arg[2] = NULL;
execvp (arg[0], arg);
//Throw a warning dialog -- PROBLEM IS HERE
...
}
The problem is I can't know if the execvp has throw the command correctly in the main program, so I can't throw a warning dialog in this moment.
How could I make to be able to throw file-roller (or another command), to be able to interact with both applications, file-roller and the parent and close them in the order I want, and be able to know if the command fails to show a gtk dialog?
Thanks.
GtkWidget *statusbox;
switch(fork())
{
case -1:
//Throw a warning dialog
...
case 0:
printf("En <0>\n");fflush(stdout);
char * arg[3];
strcpy(arg[0], "file-roller");
strcpy(arg[1], _package->getFile().c_str()); //The file param for file roller
arg[2] = NULL;
execvp (arg[0], arg);
//Throw a warning dialog -- PROBLEM IS HERE
...
}
The problem is I can't know if the execvp has throw the command correctly in the main program, so I can't throw a warning dialog in this moment.
How could I make to be able to throw file-roller (or another command), to be able to interact with both applications, file-roller and the parent and close them in the order I want, and be able to know if the command fails to show a gtk dialog?
Thanks.