Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
:: 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 #
:: 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