Fix multi piprocess wait
This commit is contained in:
@@ -209,7 +209,7 @@ void PIProcess::startProc(bool detached) {
|
|||||||
piMinSleep();
|
piMinSleep();
|
||||||
// cout << "wait" << endl;
|
// cout << "wait" << endl;
|
||||||
if (!detached) {
|
if (!detached) {
|
||||||
wait(&exit_code);
|
waitpid(pid_, &exit_code, 0);
|
||||||
pid_ = 0;
|
pid_ = 0;
|
||||||
if (!detached) PRIVATE->pid = pid_;
|
if (!detached) PRIVATE->pid = pid_;
|
||||||
// cout << "wait done" << endl;
|
// cout << "wait done" << endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user