summaryrefslogtreecommitdiff
path: root/command.h
diff options
context:
space:
mode:
Diffstat (limited to 'command.h')
-rw-r--r--command.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/command.h b/command.h
index 7166eb6..91d3b08 100644
--- a/command.h
+++ b/command.h
@@ -5,5 +5,10 @@
#include <utility>
+// Run a command and wait for completion; if successful (exit code 0), return
+// the stdout output, else throw an exception.
std::string runCommand(const std::vector<std::string> &args);
+
+// Run a command and wait for completion, returning the exit code and the
+// stdout output.
std::pair<int, std::string> readCommand(const std::vector<std::string> &args);