Safe Haskell | Safe-Infered |
---|
Calling other programs.
This module now serves basically as an interface to GHC's new System.Process module.
- data ChildProcess
- data PosixProcess
- data ChildProcessStatus
- linemode :: Bool -> Config PosixProcess
- arguments :: [String] -> Config PosixProcess
- appendArguments :: [String] -> Config PosixProcess
- environment :: [(String, String)] -> Config PosixProcess
- standarderrors :: Bool -> Config PosixProcess
- challengeResponse :: (String, String) -> Config PosixProcess
- toolName :: String -> Config PosixProcess
- newChildProcess :: FilePath -> [Config PosixProcess] -> IO ChildProcess
- sendMsg :: ChildProcess -> String -> IO ()
- sendMsgRaw :: ChildProcess -> CStringLen -> IO ()
- readMsg :: ChildProcess -> IO String
- waitForChildProcess :: ChildProcess -> IO ChildProcessStatus
Documentation
data ChildProcess Source
A running process
data PosixProcess Source
Describes configuration options for the process.
data ChildProcessStatus Source
Status if a process
linemode :: Bool -> Config PosixProcessSource
arguments :: [String] -> Config PosixProcessSource
Set command arguments
appendArguments :: [String] -> Config PosixProcessSource
Append command arguments
environment :: [(String, String)] -> Config PosixProcessSource
Set the process' environment.
toolName :: String -> Config PosixProcessSource
The name of the tool, used in error messages and in the debug file.
newChildProcess :: FilePath -> [Config PosixProcess] -> IO ChildProcessSource
Starting a new ChildProcess
sendMsg :: ChildProcess -> String -> IO ()Source
Sends a String to the ChildProcess, adding a new line for line mode.
sendMsgRaw :: ChildProcess -> CStringLen -> IO ()Source
Writes a CStringLen to the child process. It does not append a newline.
readMsg :: ChildProcess -> IO StringSource
Reads a string from the ChildProcess
waitForChildProcess :: ChildProcess -> IO ChildProcessStatusSource
Waits for the ChildProcess to exit or be terminated