Skip to content
Snippets Groups Projects
Verified Commit ffc53bf2 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Workaround hang on pthread_create

parent 3f13a228
No related branches found
No related tags found
No related merge requests found
......@@ -76,7 +76,7 @@ pub unsafe fn rlct_clone_impl(stack: *mut usize) -> Result<usize> {
// Unblock context.
syscall::kill(new_pid, SIGCONT)?;
let _ = syscall::waitpid(new_pid, &mut 0, syscall::WUNTRACED | syscall::WCONTINUED);
let _ = syscall::waitpid(new_pid, &mut 0, syscall::WUNTRACED | syscall::WCONTINUED | syscall::WNOHANG);
Ok(new_pid)
}
......
......@@ -671,7 +671,7 @@ fn fork_inner(initial_rsp: *mut usize) -> Result<usize> {
// context. This means that if pgid is changed (as it is in ion for example), the pgid message
// in syscall::exit() will not be inserted as the key comparator thinks they're equal as their
// PIDs are. So, we have to call this to clear the waitpid queue to prevent deadlocks.
let _ = syscall::waitpid(new_pid, &mut 0, syscall::WUNTRACED | syscall::WCONTINUED);
let _ = syscall::waitpid(new_pid, &mut 0, syscall::WUNTRACED | syscall::WCONTINUED | syscall::WNOHANG);
Ok(new_pid)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment