-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | run a subprocess, combining stdout and stderr
--
-- Execute a command, redirect stderr into stdout, and return the
-- combined result (optionally, with a timeout). Irritatingly difficult
-- to do using the "process" library.
@package plex
@version 0.2.0.0
-- | Generic versions of cmd, cmdTimeout etc
module System.Plex.Internal
-- | wrapped executeFile that reports error
executeFile' :: FilePath -> Bool -> [String] -> Maybe [(String, String)] -> IO ()
-- | readCommand command args: given a command to run in a
-- subprocess, and args to pass to it -- return the childPid of
-- the subprocess, and a function for reading its output.
--
-- if it doesn't start with a forward-slash, the command is
-- searched for in the current path.
readCommand :: FilePath -> [String] -> IO (ProcessID, IO String)
-- | More general version of readCommand_. First arg is a function
-- to read from the combined stdout/stderr handle.
readCommand_ :: NFData a => (Handle -> IO a) -> FilePath -> [String] -> IO (ProcessID, IO a)
-- | cmd command args: execute command with args;
-- read combined stdout and stderr; return it as a string If there is an
-- error executing the command, it'll get caught and a Haskell error
-- message will get printed.
cmd :: FilePath -> [String] -> IO String
-- | more general version of cmd.
cmd_ :: NFData b => (Handle -> IO b) -> FilePath -> [String] -> IO b
-- | same as command, but with a timeout. Hard to get it do return nicely
-- with timeout < about 10^5 microsecs
cmdTimeout :: FilePath -> [String] -> Int -> IO (Maybe String)
-- | more general version of cmdTimeout.
cmdTimeout_ :: NFData a => (Handle -> IO a) -> FilePath -> [String] -> Int -> IO (Maybe a)
-- | Execute a command, redirect stderr into stdout, and return the
-- combined result (optionally, with a timeout).
module System.Plex.ByteString
-- | readCommand command args: given a command to run in a
-- subprocess, and args to pass to it -- return the childPid of
-- the subprocess, and a function for reading its output.
--
-- if it doesn't start with a forward-slash, the command is
-- searched for in the current path.
readCommand :: FilePath -> [String] -> IO (ProcessID, IO ByteString)
-- | cmd command args: execute command with args;
-- read combined stdout and stderr; return it as a string If there is an
-- error executing the command, it'll get caught and a Haskell error
-- message will get printed.
cmd :: FilePath -> [String] -> IO ByteString
-- | same as command, but with a timeout. Hard to get it do return nicely
-- with timeout < about 10^5 microsecs
cmdTimeout :: FilePath -> [String] -> Int -> IO (Maybe ByteString)
-- | Execute a command, redirect stderr into stdout, and return the
-- combined result (optionally, with a timeout).
module System.Plex
-- | readCommand command args: given a command to run in a
-- subprocess, and args to pass to it -- return the childPid of
-- the subprocess, and a function for reading its output.
--
-- if it doesn't start with a forward-slash, the command is
-- searched for in the current path.
readCommand :: FilePath -> [String] -> IO (ProcessID, IO String)
-- | cmd command args: execute command with args;
-- read combined stdout and stderr; return it as a string If there is an
-- error executing the command, it'll get caught and a Haskell error
-- message will get printed.
cmd :: FilePath -> [String] -> IO String
-- | same as command, but with a timeout. Hard to get it do return nicely
-- with timeout < about 10^5 microsecs
cmdTimeout :: FilePath -> [String] -> Int -> IO (Maybe String)