We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 10df75f commit 8d01c44Copy full SHA for 8d01c44
1 file changed
src/util/subprocess.cpp
@@ -19,7 +19,7 @@ namespace linuxdeploy {
19
fcntl(fileno(fd), F_SETFL, flags);
20
}
21
22
- do {
+ while (true) {
23
constexpr auto bufSize = 1;
24
// constexpr auto bufSize = 512*1024;
25
std::vector<char> buf(bufSize, '\0');
@@ -42,7 +42,10 @@ namespace linuxdeploy {
42
outBuf.reserve(outBufSize + size + 1);
43
std::copy(buf.begin(), buf.begin() + size, std::back_inserter(outBuf));
44
45
- } while (proc.poll() < 0);
+
46
+ if (proc.poll() >= 0 && feof(proc.output()) != 0 && feof(proc.error()) != 0)
47
+ break;
48
+ }
49
50
std::string stdoutContents(procStdout.begin(), procStdout.end());
51
std::string stderrContents(procStderr.begin(), procStderr.end());
0 commit comments