int status;
pid_t pid = fork();
if(pid < 0) { cout<<"error create process!"<<endl; }
else if(pid == 0) { if(execl("path+exe","exe","选项",“参数” ,,,,, (char*)0) < 0)
{ cout<<"execl err"<<endl; return -1; } }
if(waitpid(pid,&status,0) < 0) {
cout<<"wait err"<<endl; return -1; }
return 0;