137 std::string base_name =
"\\\\.\\pipe\\cbmc\\child\\";
140 const std::string
in_name = base_name +
"\\IN";
175 "Input pipe creation failed on SetHandleInformation");
177 const std::string
out_name = base_name +
"\\OUT";
206 "Output pipe creation failed on SetHandleInformation");
300 <<
" failed with error: " << std::strerror(
errno) << std::endl;
359 "Number of bytes written to sub process must match message size.");
377 "Can only receive() from a fully initialised process");
378 std::string
response = std::string(
"");
400 "More bytes cannot be read at a time, than the size of the buffer");
448# define WIN_POLL_WAIT 10
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
bool can_receive()
See if this process can receive data from the other process.
piped_processt(const std::vector< std::string > &commandvec)
Initiate a new subprocess with pipes supporting communication between the parent (this process) and t...
void wait_receivable(int wait_time)
Wait for the pipe to be ready, waiting specified time between checks.
std::string receive()
Read a string from the child process' output.
send_responset send(const std::string &message)
Send a string message (command) to the child process.
statet
Enumeration to keep track of child process state.
statet get_status()
Get child process status.
send_responset
Enumeration for send response.
std::string wait_receive()
Wait until a string is available and read a string from the child process' output.
Thrown when some external system fails unexpectedly.
Subprocess communication with pipes.
#define PIPED_PROCESS_INFINITE_TIMEOUT
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
std::wstring widen(const char *s)