Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
iprocess.hpp
Go to the documentation of this file.
1#pragma once
2#include <fc/thread/future.hpp>
4#include <vector>
5#include <fc/string.hpp>
6#include <fc/filesystem.hpp>
7
8namespace fc
9{
17 {
18 public:
27
28 virtual ~iprocess(){}
29
34 virtual iprocess& exec( const path& exe, std::vector<std::string> args,
35 const path& work_dir = path(), int opts = open_all ) = 0;
36
40 virtual int result(const microseconds& timeout = microseconds::maximum()) = 0;
41
42
46 virtual void kill() = 0;
47
52
61
62 };
63
64 typedef std::shared_ptr<iprocess> iprocess_ptr;
65
66
67} // namespace fc
abstract interface for interacting with external processes
Definition iprocess.hpp:17
virtual buffered_istream_ptr out_stream()=0
returns a stream that reads from the process' stdout
virtual ~iprocess()
Definition iprocess.hpp:28
virtual buffered_istream_ptr err_stream()=0
returns a stream that reads from the process' stderr
virtual iprocess & exec(const path &exe, std::vector< std::string > args, const path &work_dir=path(), int opts=open_all)=0
virtual buffered_ostream_ptr in_stream()=0
returns a stream that writes to the process' stdin
virtual void kill()=0
virtual int result(const microseconds &timeout=microseconds::maximum())=0
static constexpr microseconds maximum()
Definition time.hpp:14
wraps boost::filesystem::path to provide platform independent path manipulation.
namespace sysio::chain
Definition authority.cpp:3
std::shared_ptr< buffered_istream > buffered_istream_ptr
std::shared_ptr< iprocess > iprocess_ptr
Definition iprocess.hpp:64
std::shared_ptr< buffered_ostream > buffered_ostream_ptr