Karya, built on Sun Nov 26 01:04:37 PST 2017 (patch 0a920b2bde70c0cbac8ee09d158064798b61bbe5)

Safe HaskellNone

Util.Process

Description

Utilities to deal with processes.

Synopsis

Documentation

supervised :: Process.CreateProcess -> IO.IO () Source #

Start a subprocess, wait for it to complete, and kill it if this thread is killed. This is like Async.withAsync, except for a subprocess, and it's hardcoded to wait for the subprocess.

TODO use Process.withCreateProcess?

multipleSupervised :: [Process.CreateProcess] -> IO.IO () Source #

Start multiple processes, and kill them all if this thread is killed.

waitAndLog :: Process.CreateProcess -> Maybe Process.ProcessHandle -> IO.IO () Source #

Wait for the process (if it started) and log if it didn't exit successfully.

call :: IO.FilePath -> [String] -> IO.IO () Source #

Like Process.callProcess, but log if the binary wasn't found or failed.

create :: Process.CreateProcess -> IO.IO (Maybe Handle, Maybe Handle, Maybe Handle, Maybe Process.ProcessHandle) Source #

Like Process.createProcess, but return a Nothing instead of a pid if the binary doesn't exist.

showt :: Show a => a -> Text Source #