what4-1.0: Solver-agnostic symbolic values support for issuing queries

Safe HaskellNone




demuxProcessHandles Source #


:: Handle

stdin for process

-> Handle

stdout for process

-> Handle

stderr for process

-> Maybe (Text, Handle) 
-> IO (OutputStream Text, InputStream Text, HandleReader) 

data HandleReader Source #

Wrapper to help with reading from another process's standard out and stderr.

We want to be able to read from another process's stderr and stdout without causing the process to stall because stdout or stderr becomes full. This data type will read from either of the handles, and buffer as much data as needed in the queue. It then provides a line-based method for reading that data as strict bytestrings.



startHandleReader :: Handle -> Maybe (OutputStream Text) -> IO HandleReader Source #

Create a new handle reader for reading the given handle.

stopHandleReader :: HandleReader -> IO () Source #

Stop the handle reader; cannot be used afterwards.

withHandleReader :: Handle -> Maybe (OutputStream Text) -> (HandleReader -> IO a) -> IO a Source #

Run an execution with a handle reader and stop it wheen down