这是一段显示问题的代码
//main
Process* process = NULL;
while(!process) {
cout<<endl<<"Waiting for second process.\nPress any key";
getchar();
getchar();
process = Process::takeExisting("process");
}
Process::waitEnd(process); //Problem here
cout<<endl<<"second process ended";
//进程::等待结束
static void waitEnd(Process* proc) {
int w = waitpid(proc->hProcess, &(proc->exitCode), WCONTINUED);
Debug::error(errno," waitpid error - ");
}
我尝试过:先停止,等待第二个结束,然后再继续。
问题:第二个进程不是子进程(我从第二个控制台运行它),因此使用此代码 errno 等于 10。
在 Linux 上如何解决这个问题?
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)