diff --git a/renderdoc/android/android_tools.cpp b/renderdoc/android/android_tools.cpp index bbf3703f2..2275c5c4a 100644 --- a/renderdoc/android/android_tools.cpp +++ b/renderdoc/android/android_tools.cpp @@ -344,7 +344,8 @@ void initAdb() Process::ProcessResult res = {}; Process::LaunchProcess(adb.c_str(), workdir.c_str(), "start-server", true, &res); - if(res.strStdout.find("daemon") != std::string::npos) + if(res.strStdout.find("daemon") != std::string::npos || + res.strStderror.find("daemon") != std::string::npos) { RDCLOG("Started adb server"); } diff --git a/renderdoc/os/posix/posix_process.cpp b/renderdoc/os/posix/posix_process.cpp index 1bc55cefc..1dba6409a 100644 --- a/renderdoc/os/posix/posix_process.cpp +++ b/renderdoc/os/posix/posix_process.cpp @@ -579,9 +579,13 @@ static pid_t RunProcess(const char *app, const char *workingDir, const char *cmd dup2(stdoutPipe[1], STDOUT_FILENO); dup2(stderrPipe[1], STDERR_FILENO); - // Close read ends, as the child will write. + // now close all pipe handles - we don't need the read ends, and the write ends have been + // duplicated into stdout/stderr above - we don't want these handles to be inherited into + // child processes. close(stdoutPipe[0]); close(stderrPipe[0]); + close(stdoutPipe[1]); + close(stderrPipe[1]); } chdir(workDir.c_str());