aboutsummaryrefslogtreecommitdiff
path: root/include/Exec.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/Exec.hpp')
-rw-r--r--include/Exec.hpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/Exec.hpp b/include/Exec.hpp
new file mode 100644
index 0000000..42b6905
--- /dev/null
+++ b/include/Exec.hpp
@@ -0,0 +1,18 @@
+#ifndef SIBS_EXEC_HPP
+#define SIBS_EXEC_HPP
+
+#include "Result.hpp"
+#include <string>
+
+namespace sibs
+{
+ struct ExecResult
+ {
+ std::string execStdout;
+ int exitCode;
+ };
+
+ Result<ExecResult> exec(const char *cmd, bool print = false);
+}
+
+#endif //SIBS_EXEC_HPP