summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2020-05-24 22:44:56 +0200
committerJan Ekström <jeebjp@gmail.com>2020-05-25 00:30:35 +0300
commitbf6afbc299f300332f36c6aec05ae10479ddc8c9 (patch)
tree0439061b0f67cb686cf2860ae585c5bcdad73bce
parent4d5688dc9a44a9f8bb1a3a4b650b45733dd1c509 (diff)
downloadmpv-bf6afbc299f300332f36c6aec05ae10479ddc8c9.tar.bz2
mpv-bf6afbc299f300332f36c6aec05ae10479ddc8c9.tar.xz
osdep: remove confstr() fallback for subprocess spawning
It doesn't exist on bionic (Android) and accurately emulating execvpe's behaviour isn't all that important.
-rw-r--r--osdep/subprocess-posix.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/osdep/subprocess-posix.c b/osdep/subprocess-posix.c
index df3c9600ac..e7af4663ea 100644
--- a/osdep/subprocess-posix.c
+++ b/osdep/subprocess-posix.c
@@ -150,13 +150,8 @@ void mp_subprocess2(struct mp_subprocess_opts *opts,
bool killed_by_us = false;
int cancel_fd = -1;
char *path = getenv("PATH");
- char path_storage[PATH_MAX];
- if (!path) {
- path = path_storage;
- size_t r = confstr(_CS_PATH, path, sizeof(path_storage));
- if (r == 0 || r >= sizeof(path_storage))
- path[0] = '\0'; // failure, who cares
- }
+ if (!path)
+ path = ""; // failure, who cares
*res = (struct mp_subprocess_result){0};