Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
process.hpp
Go to the documentation of this file.
1#pragma once
3
4namespace fc {
5
7
12 class process : public iprocess
13 {
14 public:
15 process();
16 ~process();
17
18 virtual iprocess& exec( const fc::path& exe,
19 std::vector<std::string> args,
20 const fc::path& work_dir = fc::path(),
21 int opts = open_all );
22
23
24 virtual int result(const microseconds& timeout = microseconds::maximum());
25 virtual void kill();
29
30 class impl;
31 private:
32 std::unique_ptr<impl> my;
33 };
34
35 typedef std::shared_ptr<process> process_ptr;
36
37} // namespace fc
std::string name
abstract interface for interacting with external processes
Definition iprocess.hpp:17
static constexpr microseconds maximum()
Definition time.hpp:14
wraps boost::filesystem::path to provide platform independent path manipulation.
start and manage an local process
Definition process.hpp:13
virtual void kill()
Definition process.cpp:161
virtual int result(const microseconds &timeout=microseconds::maximum())
Definition process.cpp:185
virtual fc::buffered_ostream_ptr in_stream()
returns a stream that writes to the process' stdin
Definition process.cpp:168
virtual fc::buffered_istream_ptr out_stream()
returns a stream that reads from the process' stdout
Definition process.cpp:175
virtual iprocess & exec(const fc::path &exe, std::vector< std::string > args, const fc::path &work_dir=fc::path(), int opts=open_all)
Definition process.cpp:75
virtual fc::buffered_istream_ptr err_stream()
returns a stream that reads from the process' stderr
Definition process.cpp:181
namespace sysio::chain
Definition authority.cpp:3
std::shared_ptr< process > process_ptr
Definition process.hpp:35
std::string string
Definition string.hpp:10
std::shared_ptr< buffered_istream > buffered_istream_ptr
std::shared_ptr< buffered_ostream > buffered_ostream_ptr
fc::path find_executable_in_path(const fc::string name)
Definition process.cpp:15