#include <stdio.h>
#include <unistd.h>
void test_sys_exec(){
char arq[128] = "/bin/mousepad x1.txt";
char* prms[10] = { (char*)0 };
char* envp[10] = { (char*)0 };
execve(arq, prms, envp);
}
int main(int argc, char **argv){
test_sys_exec();
puts("fim");
while(getchar() != 10);
return 0;
}
Just the console window with the 'fim' message, without appearing the mousepad window
what is wrong?