uni-posixutil-2.2.1.0: Posix utilities for the uniform workbench

Posixutil.ChildProcess

Description

Calling other programs.

This module now serves basically as an interface to GHC's new System.Process module.

Synopsis

Documentation

data PosixProcess Source

Describes configuration options for the process.

linemode :: Bool -> Config PosixProcessSource

If True, readMsg returns lines, otherwise it returs the first input that's available

arguments :: [String] -> Config PosixProcessSource

Set command arguments

appendArguments :: [String] -> Config PosixProcessSource

Append command arguments

environment :: [(String, String)] -> Config PosixProcessSource

Set the process' environment.

challengeResponse :: (String, String) -> Config PosixProcessSource

Set a challenge and response. This is used as a test when the tool starts up, to make sure that everything is working properly.

toolName :: String -> Config PosixProcessSource

The name of the tool, used in error messages and in the debug file.

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