Processing (*nix): use traditional fork-exec on Android and OpenBSD

Fix https://github.com/termux/termux-packages/issues/25369
This commit is contained in:
李通洲
2025-07-18 10:37:52 +08:00
parent 8647e366f9
commit f7db03b8c4
3 changed files with 49 additions and 3 deletions
+2
View File
@@ -222,6 +222,8 @@ static inline bool ffSearchUserConfigFile(const FFlist* configDirs, const char*
return false;
}
FFNativeFD ffGetNullFD(void);
#ifdef _WIN32
// Only O_RDONLY is supported
HANDLE openat(HANDLE dfd, const char* fileName, bool directory);
+9
View File
@@ -358,3 +358,12 @@ void ffListFilesRecursively(const char* path, bool pretty)
ffStrbufEnsureEndsWithC(&folder, '/');
listFilesRecursively(folder.length, &folder, 0, NULL, pretty);
}
FFNativeFD ffGetNullFD(void)
{
static FFNativeFD hNullFile = -1;
if (hNullFile != -1)
return hNullFile;
hNullFile = open("/dev/null", O_WRONLY | O_CLOEXEC);
return hNullFile;
}