110 boost::process::v1::opstream in;
111 boost::process::v1::ipstream out;
112 boost::process::v1::ipstream err;
114 const auto runCommand =
myRunDialog->getRunCommand();
121 boost::process::v1::child c(runCommand,
122 boost::process::v1::std_in < in,
123 boost::process::v1::std_out > out,
124 boost::process::v1::std_err > err);
126 std::thread outReaderThread([&out,
this]() {
129 while (std::getline(out, buffer)) {
131 if (!buffer.empty() && (buffer.back() ==
'\r')) {
139 std::thread errReaderThread([&err,
this]() {
142 while (std::getline(err, buffer)) {
144 if (!buffer.empty() && (buffer.back() ==
'\r')) {
155 if (outReaderThread.joinable()) {
156 outReaderThread.join();
158 if (errReaderThread.joinable()) {
159 errReaderThread.join();
167 return c.exit_code();
176 const std::string runCommand =
myRunDialog->getRunCommand();
179 for (
int i = 0; i < 128; i++) {
186 myPipe = popen((runCommand +
" 2>&1").c_str(),
"r");
203 while (fgets(buffer,
sizeof buffer,
myPipe) != NULL) {