[LibOS] shim_ipc_helper.c: Actually wait for 0.5 seconds on IPC exit

Before exiting, the IPC helper is supposed to wait for 0.5s for all in-flight
IPC messages to reach their destinations (e.g., child processes). Otherwise,
the destination processes may become abandoned zombies. Previously, this was
achieved by `DkThreadDelayExecution(500)`. However, this function uses
microseconds not milliseconds, thus, Graphene actually waited only for 0.005
seconds (which is not enough under heavy system-wide load). This commit fixes
this time-unit bug.
This commit is contained in:
Dmitrii Kuvaiskii
2019-11-08 15:17:22 -08:00
parent c6b83c7b3e
commit 5be9fbb689
+1 -1
View File
@@ -869,7 +869,7 @@ struct shim_thread* terminate_ipc_helper(void) {
* prevent such cases, we simply wait for a bit before exiting.
* */
debug("Waiting for 0.5s for all in-flight IPC messages to reach their destinations\n");
DkThreadDelayExecution(500);
DkThreadDelayExecution(500000); /* in microseconds */
lock(&ipc_helper_lock);
if (ipc_helper_state != HELPER_ALIVE) {