Show the child process wait code instead of turning it into an error string

The exit code of the child process may not fit in 8 bits, it's more useful to provide the full child process status.

Fixes https://github.com/libsdl-org/SDL/issues/16188
This commit is contained in:
Sam Lantinga
2026-08-23 10:32:18 -07:00
parent 85260aa180
commit 8b1e4aa41b

View File

@@ -366,7 +366,7 @@ bool SDL_SYS_CreateProcessWithProperties(SDL_Process *process, SDL_PropertiesID
goto posix_spawn_fail_all;
}
if (status != 0) {
SDL_SetError("posix_spawn() failed: %s", strerror(status));
SDL_SetError("posix_spawn() failed: %d", status);
goto posix_spawn_fail_all;
}
break;