Previously the test would kill the child process while it was in the process of initializing (loading DLLs, etc) and this would cause the test to fail.
(cherry picked from commit 937b7e6aea)
Standard I/O doesn't work well with non-blocking handles, so make sure any pipes are in blocking mode before launching child processes.
Fixes https://github.com/libsdl-org/SDL/issues/10998
We require stdbool.h in the build environment, so we might as well use the plain bool type.
If your environment doesn't have stdbool.h, this simple replacement will suffice:
typedef signed char bool;
This had the unfortunate side-effect of blocking if you tried to write too much. Instead you can use SDL_GetProcessInput() and handle SDL_IO_STATUS_NOT_READY as needed.
Fixes https://github.com/libsdl-org/SDL/issues/10834
Also marked the existing functions as unsafe, as they can cause crashes if used in multi-threaded applications.
As a bonus, since the new functions are hashtable based, hint environment lookups are much faster.