You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

27 lines
963 B

diff --git a/src/subprocess-posix.cc b/src/subprocess-posix.cc
index 1de22c3..f988297 100644
--- a/src/subprocess-posix.cc
+++ b/src/subprocess-posix.cc
@@ -22,10 +22,10 @@
#include <stdio.h>
#include <string.h>
#include <sys/wait.h>
-#include <spawn.h>
extern char** environ;
+#include "spawn.h"
#include "util.h"
Subprocess::Subprocess(bool use_console) : fd_(-1), pid_(-1),
@@ -110,8 +110,8 @@ bool Subprocess::Start(SubprocessSet* set, const string& command) {
if (err != 0)
Fatal("posix_spawnattr_setflags: %s", strerror(err));
- const char* spawned_args[] = { "/bin/sh", "-c", command.c_str(), NULL };
- err = posix_spawn(&pid_, "/bin/sh", &action, &attr,
+ const char* spawned_args[] = { "@TERMUX_PREFIX@/bin/sh", "-c", command.c_str(), NULL };
+ err = posix_spawn(&pid_, "@TERMUX_PREFIX@/bin/sh", &action, &attr,
const_cast<char**>(spawned_args), environ);
if (err != 0)
Fatal("posix_spawn: %s", strerror(err));