vtl: amend 0c2d95b
- fix possible race condition when terminating external program
This commit is contained in:
parent
941898843e
commit
9274b870ab
@ -306,7 +306,6 @@ SystemExec::output_interposer()
|
|||||||
ReadStdout(data, bytesRead);/* EMIT SIGNAL */
|
ReadStdout(data, bytesRead);/* EMIT SIGNAL */
|
||||||
}
|
}
|
||||||
Terminated();/* EMIT SIGNAL */
|
Terminated();/* EMIT SIGNAL */
|
||||||
terminate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -618,7 +617,6 @@ SystemExec::output_interposer()
|
|||||||
ReadStdout(rv, r);/* EMIT SIGNAL */
|
ReadStdout(rv, r);/* EMIT SIGNAL */
|
||||||
}
|
}
|
||||||
Terminated();/* EMIT SIGNAL */
|
Terminated();/* EMIT SIGNAL */
|
||||||
terminate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -653,9 +651,6 @@ SystemExec::write_to_stdin(std::string d, size_t len)
|
|||||||
}
|
}
|
||||||
if (r != (len-c)) {
|
if (r != (len-c)) {
|
||||||
::pthread_mutex_unlock(&write_lock);
|
::pthread_mutex_unlock(&write_lock);
|
||||||
#if 1 // debug
|
|
||||||
printf("XXX: child process communication breakdown.\n");
|
|
||||||
#endif
|
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user