Extract subprocessing into separate library

This commit is contained in:
TheAssassin
2018-10-25 14:34:54 +02:00
parent 0c5b198e2f
commit 10df75f877
5 changed files with 82 additions and 45 deletions

View File

@@ -0,0 +1,19 @@
/**
* Wrapper for cpp-subprocess. Provides additional convenience functions.
*/
#pragma once
// library includes
#include <subprocess.hpp>
namespace linuxdeploy {
namespace util {
namespace subprocess {
using namespace ::subprocess;
// Reads output channels of existing Popen object into buffers and returns the contents
std::pair<std::string, std::string> check_output_error(Popen& proc);
}
}
}

View File

@@ -1,5 +1,6 @@
// local includes
#include "misc.h"
#include "subprocess.h"
// import functions from misc module for convenience
namespace linuxdeploy {