houseman-0.1.0: A Haskell implementation of Foreman

Safe HaskellSafe
LanguageHaskell2010

Houseman.Internal

Synopsis

Documentation

terminateAndWaitForProcess :: StreamingProcessHandle -> IO ExitCode Source

Terminates and waits for given process.

withAllExit Source

Arguments

:: (ExitCode -> Bool)

Predicate

-> [StreamingProcessHandle]

Process handles to watch

-> IO a

Action to run

-> IO a 

Watch exit of given process handles, and if all of them exited and passed given predicate, runs action.

withAnyExit Source

Arguments

:: (ExitCode -> Bool)

Predicate

-> [StreamingProcessHandle]

Process handles to watch

-> IO a

Action to run

-> IO a 

Watch exit of given process handles, and if any of them exited and passed given predicate, runs action.

withProcess Source

Arguments

:: CreateProcess

The process

-> ((Handle, Handle, StreamingProcessHandle) -> IO a)

Action takes stdout, stderr and process handle

-> IO a 

Runs given process and invoke action with stdout, stderr, process handle from it. stdout and stderr will be closed after action.