Copyright | (c) Henry J. Wylde, 2015 |
---|---|
License | BSD3 |
Maintainer | public@hjwylde.com |
Safe Haskell | None |
Language | Haskell2010 |
System process utilities.
- runProcess :: (MonadIO m, MonadLogger m) => FilePath -> [String] -> m (ExitCode, String, String)
- runProcess_ :: (MonadError ExitCode m, MonadIO m, MonadLogger m) => FilePath -> [String] -> m String
- runTimedProcess :: (MonadIO m, MonadLogger m) => Int -> FilePath -> [String] -> m (ExitCode, String, String)
- runCommand :: (MonadIO m, MonadLogger m) => String -> m (ExitCode, String, String)
- runCommand_ :: (MonadError ExitCode m, MonadIO m, MonadLogger m) => String -> m String
- runTimedCommand :: (MonadIO m, MonadLogger m) => Int -> String -> m (ExitCode, String, String)
- runCreateProcess :: (MonadIO m, MonadLogger m) => CreateProcess -> String -> m (ExitCode, String, String)
- runCreateProcess_ :: (MonadError ExitCode m, MonadIO m, MonadLogger m) => CreateProcess -> String -> m String
Run
runProcess :: (MonadIO m, MonadLogger m) => FilePath -> [String] -> m (ExitCode, String, String) Source
Runs the given executable with the arguments. Returns the exit code, stdout and stderr.
runProcess_ :: (MonadError ExitCode m, MonadIO m, MonadLogger m) => FilePath -> [String] -> m String Source
Runs the given executable with the arguments. Depending on the exit code, either logs the stderr and exits fast (128) or returns the stdout.
runTimedProcess :: (MonadIO m, MonadLogger m) => Int -> FilePath -> [String] -> m (ExitCode, String, String) Source
Runs the given executable with the arguments. Returns the exit code, stdout and stderr. The command is wrapped in a `timeout -k N*2 N` call.
runCommand :: (MonadIO m, MonadLogger m) => String -> m (ExitCode, String, String) Source
Runs the given command. Returns the exit code, stdout and stderr.
runCommand_ :: (MonadError ExitCode m, MonadIO m, MonadLogger m) => String -> m String Source
Runs the given command. Depending on the exit code, either logs the stderr and exits fast (128) or returns the stdout.
runTimedCommand :: (MonadIO m, MonadLogger m) => Int -> String -> m (ExitCode, String, String) Source
Runs the given command. Returns the exit code, stdout and stderr. The command is wrapped in a `timeout -k N*2 N` call.
runCreateProcess :: (MonadIO m, MonadLogger m) => CreateProcess -> String -> m (ExitCode, String, String) Source
Runs the given CreateProcess
.
Returns the exit code, stdout and stderr.
runCreateProcess_ :: (MonadError ExitCode m, MonadIO m, MonadLogger m) => CreateProcess -> String -> m String Source
Runs the given CreateProcess
.
Depending on the exit code, either logs the stderr and exits fast (128) or returns the stdout.