Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FILE* pipe = _popen(command_.c_str(), "r");
- if (!pipe)
- {
- throw std::runtime_error{
- "Subprocess::Run: error starting [" + command_ + "]"
- };
- }
- std::array<char, 512> buffer;
- while (!feof(pipe))
- if (fgets(buffer.data(), buffer.size(), pipe) != NULL)
- output_.append(buffer.data());
- exit_code_ = _pclose(pipe);
- 'dfakjhfasidufha' is not recognized as an internal or external command,
- operable program or batch file.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement