return -1 when no exit code presents in WaitProcess()

This commit is contained in:
moe li 2026-05-25 16:48:36 +08:00
parent c0b4c6ca58
commit 05e35b81f6

View File

@ -4587,12 +4587,10 @@ RLAPI int WaitProcess(Process process)
// Normal exit // Normal exit
return WEXITSTATUS(status); return WEXITSTATUS(status);
} }
else if (WIFSIGNALED(status))
{ // Terminated by signal or other non-normal exit
// Terminated by signal
return -1; return -1;
} }
}
else else
{ {
TRACELOG(LOG_WARNING, "PROCESS: Failed to wait for process"); TRACELOG(LOG_WARNING, "PROCESS: Failed to wait for process");