Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
g-bartoszek committed Sep 5, 2023
1 parent f9242ac commit a0b824b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/wasix/src/syscalls/wasix/proc_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,22 +189,23 @@ pub(super) fn proc_join_internal<M: MemorySize + 'static>(
} else {
ret_result(ctx, JoinStatusResult::Nothing)
};
}
else {
} else {
// Wait for the process to finish
let process2 = process.clone();
let res =
__asyncify_with_deep_sleep::<M, _, _>(ctx, Duration::from_millis(50), async move {
let res = __asyncify_with_deep_sleep::<M, _, _>(
ctx,
Duration::from_millis(50),
async move {
let exit_code = process.join().await.unwrap_or_else(|_| Errno::Child.into());
tracing::trace!(%exit_code, "triggered child join");
JoinStatusResult::ExitNormal(pid, exit_code)
})?;
},
)?;
return match res {
AsyncifyAction::Finish(ctx, result) => ret_result(ctx, result),
AsyncifyAction::Unwind => Ok(Errno::Success),
};
}

}

trace!(ret_id = pid.raw(), "status=nothing");
Expand Down

0 comments on commit a0b824b

Please sign in to comment.