diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2019-12-29 14:47:00 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2019-12-29 14:47:00 +0100 |
commit | 3ee478b558307b690b4839c82bb6612cc3c3f3ac (patch) | |
tree | 5d06a580dc004a16e387cb995c9772ac1b19abb2 /src/jo_exec.cpp | |
parent | oop rework in progress (diff) | |
download | lowbat-gnu-3ee478b558307b690b4839c82bb6612cc3c3f3ac.tar.gz lowbat-gnu-3ee478b558307b690b4839c82bb6612cc3c3f3ac.tar.bz2 lowbat-gnu-3ee478b558307b690b4839c82bb6612cc3c3f3ac.tar.xz lowbat-gnu-3ee478b558307b690b4839c82bb6612cc3c3f3ac.tar.zst lowbat-gnu-3ee478b558307b690b4839c82bb6612cc3c3f3ac.zip |
work in progress
Diffstat (limited to '')
-rw-r--r-- | src/jo_exec.cpp | 15 |
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; -} |