mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-06 13:51:28 +00:00
[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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user