mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-07 07:00:48 +00:00
Close the other file descriptors after redirection has taken place
Fixes https://github.com/libsdl-org/SDL/issues/10868
This commit is contained in:
parent
4b3058d58d
commit
98cd8b34a7
1 changed files with 4 additions and 4 deletions
|
|
@ -197,10 +197,6 @@ bool SDL_SYS_CreateProcessWithProperties(SDL_Process *process, SDL_PropertiesID
|
|||
goto posix_spawn_fail_attr;
|
||||
}
|
||||
|
||||
if (!AddFileDescriptorCloseActions(&fa)) {
|
||||
goto posix_spawn_fail_all;
|
||||
}
|
||||
|
||||
// Background processes don't have access to the terminal
|
||||
if (process->background) {
|
||||
if (stdin_option == SDL_PROCESS_STDIO_INHERITED) {
|
||||
|
|
@ -347,6 +343,10 @@ bool SDL_SYS_CreateProcessWithProperties(SDL_Process *process, SDL_PropertiesID
|
|||
}
|
||||
}
|
||||
|
||||
if (!AddFileDescriptorCloseActions(&fa)) {
|
||||
goto posix_spawn_fail_all;
|
||||
}
|
||||
|
||||
// Spawn the new process
|
||||
if (process->background) {
|
||||
int status = -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue