mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-14 17:28:07 +00:00
fix process reap in the join API
This commit is contained in:
committed by
Ryan Fleury
parent
55172718c9
commit
846b2bdf70
@@ -1285,15 +1285,12 @@ process_join(Process process, U64 endt_us, U64 *exit_code_out)
|
||||
B32 result = 0;
|
||||
if(endt_us == 0)
|
||||
{
|
||||
if(kill(pid, 0) >= 0)
|
||||
if(kill(pid, 0) == 0)
|
||||
{
|
||||
result = (errno == ENOENT);
|
||||
if(result)
|
||||
{
|
||||
int status;
|
||||
waitpid(pid, &status, 0);
|
||||
}
|
||||
int status;
|
||||
waitpid(pid, &status, WNOHANG);
|
||||
}
|
||||
else { Assert(0 && "failed to get status from pid"); }
|
||||
}
|
||||
else if(endt_us == max_U64)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user