cprover
pipe_streamt Class Reference

#include <pipe_stream.h>

Inheritance diagram for pipe_streamt:
[legend]
Collaboration diagram for pipe_streamt:
[legend]

Public Member Functions

 pipe_streamt (const std::string &_executable, const std::list< std::string > &_args)
 Constructor for external process. More...
 
int run ()
 Starts an external process. More...
 
int wait ()
 Wait for the process to terminate. More...
 

Protected Attributes

std::string executable
 
std::list< std::string > args
 
pid_t pid
 
filedescriptor_streambuft buffer
 

Detailed Description

Definition at line 55 of file pipe_stream.h.

Constructor & Destructor Documentation

§ pipe_streamt()

pipe_streamt::pipe_streamt ( const std::string &  _executable,
const std::list< std::string > &  _args 
)

Constructor for external process.

Definition at line 34 of file pipe_stream.cpp.

References args, buffer, executable, FALSE, run(), filedescriptor_streambuft::set_in(), filedescriptor_streambuft::set_out(), TRUE, and widen().

Member Function Documentation

§ run()

int pipe_streamt::run ( )

Starts an external process.

A new process is forked and run returns immediately.

Returns
Returns -1 if an error occurs.

Definition at line 133 of file pipe_stream.cpp.

References args, buffer, executable, pid, filedescriptor_streambuft::set_in(), and filedescriptor_streambuft::set_out().

Referenced by pipe_streamt(), and filedescriptor_streambuft::showmanyc().

§ wait()

int pipe_streamt::wait ( )

Wait for the process to terminate.

Definition at line 191 of file pipe_stream.cpp.

References pid.

Referenced by filedescriptor_streambuft::showmanyc().

Member Data Documentation

§ args

std::list<std::string> pipe_streamt::args
protected

Definition at line 67 of file pipe_stream.h.

Referenced by pipe_streamt(), and run().

§ buffer

filedescriptor_streambuft pipe_streamt::buffer
protected

Definition at line 75 of file pipe_stream.h.

Referenced by pipe_streamt(), and run().

§ executable

std::string pipe_streamt::executable
protected

Definition at line 66 of file pipe_stream.h.

Referenced by pipe_streamt(), and run().

§ pid

pid_t pipe_streamt::pid
protected

Definition at line 72 of file pipe_stream.h.

Referenced by run(), and wait().


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