CProver APIs
|
src/util/piped_process.{cpp, h}
To utilise the piped_process
API for interprocess communication with any binary:
piped_processt("binary with args")
.system_exceptiont
.binary command
does not correspond to a binary in the $PATH
or is not a path to a binary itself, you'll read a string Launching <xyz> failed with error: <error>
when you attempt to receive()
output from the child process.piped_processt
object is called.piped_processt
goes out of scope if it's locally scoped.send()
to send a string message to the child process' input.send_responset
, an enum that shows whether the sending of the message through the pipe succeeded or failed.receive()
to read a string message from the child process' output.receive
with can_receive()
, so that receiving is blocked until there's something to receive.can_receive
with no arguments will default to infinite wait time for piped process readiness.receive
with wait_receivable
. wait_receivable
takes an integer value representing microseconds
of waiting time between checks for pipe readiness.Last modified: 2024-12-03 12:50:29 +0000