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

Safe Haskell | None
Language | Haskell2010

What4.Utils.Process

Synopsis

- withProcessHandles :: FilePath -> [String] -> Maybe FilePath -> ((Handle, Handle, Handle, ProcessHandle) -> IO a) -> IO a
- resolveSolverPath :: FilePath -> IO FilePath
- findSolverPath :: ConfigOption (BaseStringType Unicode) -> Config -> IO FilePath
- filterAsync :: SomeException -> Maybe SomeException
- startProcess :: FilePath -> [String] -> Maybe FilePath -> IO (Handle, Handle, Handle, ProcessHandle)
- cleanupProcess :: (Handle, Handle, Handle, ProcessHandle) -> IO ExitCode

# Documentation

withProcessHandles Source #

Arguments

:: FilePath | Path to process
-> [String] | Arguments to process
-> Maybe FilePath | Working directory if any.
-> ((Handle, Handle, Handle, ProcessHandle) -> IO a) | Action to run with process; should wait for process to terminate before returning.
-> IO a |

This runs a given external binary, providing the process handle and handles to input and output to the action. It takes care to terminate the process if any exception is thrown by the action.

resolveSolverPath :: FilePath -> IO FilePath Source #

Utility function that runs a solver specified by the given config setting within a context. Errors can then be attributed to the solver.

findSolverPath :: ConfigOption (BaseStringType Unicode) -> Config -> IO FilePath Source #

filterAsync :: SomeException -> Maybe SomeException Source #

Filtering function for use with `catchJust` or `tryJust` that filters out async exceptions so they are rethrown instead of captured

startProcess Source #

Arguments

:: FilePath | Path to executable
-> [String] | Command-line arguments
-> Maybe FilePath | Optional working directory
-> IO (Handle, Handle, Handle, ProcessHandle) | process stdin, process stdout, process stderr, process handle

Start a process connected to this one via pipes.

cleanupProcess :: (Handle, Handle, Handle, ProcessHandle) -> IO ExitCode Source #

Close the connected process pipes and wait for the process to exit