Merge branch 'pte_waitpid' into 'master'

pte: pte_osThreadWaitForEnd checking return of Sys::waitpid

Closes #165

See merge request redox-os/relibc!359
This commit is contained in:
Jeremy Soller
2023-04-03 17:11:47 +00:00
+3 -1
View File
@@ -233,7 +233,9 @@ pub unsafe extern "C" fn pte_osThreadDelete(handle: pte_osThreadHandle) -> pte_o
#[no_mangle]
pub unsafe extern "C" fn pte_osThreadWaitForEnd(handle: pte_osThreadHandle) -> pte_osResult {
let mut status = 0;
Sys::waitpid(handle, &mut status, 0);
if Sys::waitpid(handle, &mut status, 0) < 0 {
return PTE_OS_GENERAL_FAILURE;
}
PTE_OS_OK
}