mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 22:36:00 +00:00
fix(native): close-from in spawned programs covers what is open at the spawn
This commit is contained in:
1 parent
d6363d3b48
commit
c8757e7a94
2 files changed
+118
-13
No files matched your search
@@ -878,10 +878,13 @@ static int ddnatv_posix_spawn(pid_t *pid, const char *path,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void apply_closefrom(posix_spawn_file_actions_t *actions);
|
||||
|
||||
int posix_spawn(pid_t *pid, const char *path,
|
||||
const posix_spawn_file_actions_t *file_actions,
|
||||
const posix_spawnattr_t *attrp,
|
||||
char *const argv[], char *const envp[]) {
|
||||
if (file_actions) apply_closefrom((posix_spawn_file_actions_t *)file_actions);
|
||||
posix_spawnattr_t sanitized;
|
||||
return ddnatv_posix_spawn(pid, path, file_actions, spawn_attr_for_android(attrp, &sanitized), argv, envp, 0);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user