mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-14 02:07:49 +00:00
Fixed process I/O redirection to NUL on Windows
(cherry picked from commit 4093e4a193)
This commit is contained in:
parent
9a4faf9ab9
commit
18d367afd2
1 changed files with 3 additions and 3 deletions
|
|
@ -330,7 +330,7 @@ bool SDL_SYS_CreateProcessWithProperties(SDL_Process *process, SDL_PropertiesID
|
|||
startup_info.hStdInput = stdin_pipe[READ_END];
|
||||
break;
|
||||
case SDL_PROCESS_STDIO_NULL:
|
||||
startup_info.hStdInput = CreateFile(TEXT("\\\\.\\NUL"), GENERIC_ALL, 0, &security_attributes, OPEN_EXISTING, 0, NULL);
|
||||
startup_info.hStdInput = CreateFile(TEXT("\\\\.\\NUL"), (GENERIC_READ | GENERIC_WRITE), 0, &security_attributes, OPEN_EXISTING, 0, NULL);
|
||||
break;
|
||||
case SDL_PROCESS_STDIO_INHERITED:
|
||||
default:
|
||||
|
|
@ -367,7 +367,7 @@ bool SDL_SYS_CreateProcessWithProperties(SDL_Process *process, SDL_PropertiesID
|
|||
startup_info.hStdOutput = stdout_pipe[WRITE_END];
|
||||
break;
|
||||
case SDL_PROCESS_STDIO_NULL:
|
||||
startup_info.hStdOutput = CreateFile(TEXT("\\\\.\\NUL"), GENERIC_ALL, 0, &security_attributes, OPEN_EXISTING, 0, NULL);
|
||||
startup_info.hStdOutput = CreateFile(TEXT("\\\\.\\NUL"), (GENERIC_READ | GENERIC_WRITE), 0, &security_attributes, OPEN_EXISTING, 0, NULL);
|
||||
break;
|
||||
case SDL_PROCESS_STDIO_INHERITED:
|
||||
default:
|
||||
|
|
@ -413,7 +413,7 @@ bool SDL_SYS_CreateProcessWithProperties(SDL_Process *process, SDL_PropertiesID
|
|||
startup_info.hStdError = stderr_pipe[WRITE_END];
|
||||
break;
|
||||
case SDL_PROCESS_STDIO_NULL:
|
||||
startup_info.hStdError = CreateFile(TEXT("\\\\.\\NUL"), GENERIC_ALL, 0, &security_attributes, OPEN_EXISTING, 0, NULL);
|
||||
startup_info.hStdError = CreateFile(TEXT("\\\\.\\NUL"), (GENERIC_READ | GENERIC_WRITE), 0, &security_attributes, OPEN_EXISTING, 0, NULL);
|
||||
break;
|
||||
case SDL_PROCESS_STDIO_INHERITED:
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue