Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
fc::iprocess Class Referenceabstract

abstract interface for interacting with external processes More...

#include <iprocess.hpp>

Inheritance diagram for fc::iprocess:

Public Types

enum  exec_opts {
  open_none = 0 , open_stdin = 0x01 , open_stdout = 0x02 , open_stderr = 0x04 ,
  open_all = open_stdin|open_stdout|open_stderr , suppress_console = 0x08
}
 

Public Member Functions

virtual ~iprocess ()
 
virtual iprocessexec (const path &exe, std::vector< std::string > args, const path &work_dir=path(), int opts=open_all)=0
 
virtual int result (const microseconds &timeout=microseconds::maximum())=0
 
virtual void kill ()=0
 
virtual buffered_ostream_ptr in_stream ()=0
 returns a stream that writes to the process' stdin
 
virtual buffered_istream_ptr out_stream ()=0
 returns a stream that reads from the process' stdout
 
virtual buffered_istream_ptr err_stream ()=0
 returns a stream that reads from the process' stderr
 

Detailed Description

At the very least we have ssh::process and direct child processes, and there may be other processes that need to implement this protocol.

Definition at line 16 of file iprocess.hpp.

Member Enumeration Documentation

◆ exec_opts

Enumerator
open_none 
open_stdin 
open_stdout 
open_stderr 
open_all 
suppress_console 

Definition at line 19 of file iprocess.hpp.

19 {
20 open_none = 0,
21 open_stdin = 0x01,
22 open_stdout = 0x02,
23 open_stderr = 0x04,
25 suppress_console = 0x08
26 };

Constructor & Destructor Documentation

◆ ~iprocess()

virtual fc::iprocess::~iprocess ( )
inlinevirtual

Definition at line 28 of file iprocess.hpp.

28{}

Member Function Documentation

◆ err_stream()

virtual buffered_istream_ptr fc::iprocess::err_stream ( )
pure virtual

Implemented in fc::process.

◆ exec()

virtual iprocess & fc::iprocess::exec ( const path & exe,
std::vector< std::string > args,
const path & work_dir = path(),
int opts = open_all )
pure virtual
Returns
*this

Implemented in fc::process.

◆ in_stream()

virtual buffered_ostream_ptr fc::iprocess::in_stream ( )
pure virtual

Implemented in fc::process.

◆ kill()

virtual void fc::iprocess::kill ( )
pure virtual

Forcefully kills the process.

Implemented in fc::process.

◆ out_stream()

virtual buffered_istream_ptr fc::iprocess::out_stream ( )
pure virtual

Implemented in fc::process.

◆ result()

virtual int fc::iprocess::result ( const microseconds & timeout = microseconds::maximum())
pure virtual
Returns
blocks until the process exits

Implemented in fc::process.


The documentation for this class was generated from the following file: