31 #define pclose _pclose
38 if ( !silent )
TR << message <<
' ' << command_line << std::endl;
40 FILE *pipe = popen( (command_line+
" 2>&1" ).c_str(),
"r");
45 while ( !feof(pipe) ) {
46 if ( fgets(buffer, 256, pipe) != NULL ) r.
output += buffer;
52 r.
output =
"Could not open pipe!";
#define utility_exit_with_message(m)
Exit with file + line + message.
Various functions to run external executables.
ExecutionResult execute(std::string const &message, std::string const &command_line, bool terminate_on_failure, bool silent)
excute provided command_line though shell and return exit_code and output
static THREAD_LOCAL basic::Tracer TR("basic.execute")
Program exit functions and macros.
Struct that hold result code + output of external process.
Class for handling user debug/warnings/errors. Use instance of this class instead of 'std::cout' for ...
int const silent
Named verbosity levels.