Linux WaitForSingleObject?
问题 Here a piece of code showing the problem //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"; //Process::waitEnd static void waitEnd(Process* proc) { int w = waitpid(proc->hProcess, &(proc->exitCode), WCONTINUED); Debug::error(errno," waitpid error - "); } I've tried: stop first, wait second