aboutsummaryrefslogtreecommitdiffstats
path: root/src/jo_exec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/jo_exec.cpp')
-rw-r--r--src/jo_exec.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/jo_exec.cpp b/src/jo_exec.cpp
index 04efb66..bbee5bb 100644
--- a/src/jo_exec.cpp
+++ b/src/jo_exec.cpp
@@ -1,17 +1,2 @@
#include <jo_lowbat.hpp>
-#include <array>
-#include <memory>
-string
-jo_exec(const char* cmd) {
- array<char, 128> buffer;
- string result;
- unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose);
- if (!pipe) {
- throw runtime_error("popen() failed!");
- }
- while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) {
- result += buffer.data();
- }
- return result;
-}