Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
CompilerStrategy.cpp File Reference
#include "CompilerStrategy.h"
#include <stdexcept>
#include <sys/wait.h>
Include dependency graph for CompilerStrategy.cpp:

Go to the source code of this file.

Functions

bool executeCommand (const std::string &command)
 Executes a shell command and captures its output.
 

Function Documentation

◆ executeCommand()

bool executeCommand ( const std::string &  command)

Executes a shell command and captures its output.

The command string is executed via popen(), with stderr redirected to stdout (using 2>&1). The complete output is read and, on failure, printed to std::cerr.

Parameters
commandShell command to execute.
Returns
true if the command exited with status 0.
Exceptions
std::runtime_errorif the command cannot be started or exits with a non-zero status. This intentionally stops the MARTY pipeline at the first failing command instead of cascading into missing-file errors.

Definition at line 6 of file CompilerStrategy.cpp.