| ||||||||||||||||||
| ||||||||||||||||||
Description | ||||||||||||||||||
Command invocation utilities. Written by John Goerzen, jgoerzen@complete.org | ||||||||||||||||||
Synopsis | ||||||||||||||||||
| ||||||||||||||||||
Documentation | ||||||||||||||||||
data PipeMode | ||||||||||||||||||
| ||||||||||||||||||
safeSystem :: FilePath -> [String] -> IO () | ||||||||||||||||||
Invokes the specified command in a subprocess, waiting for the result. If the command terminated successfully, return normally. Otherwise, raises a userError with the problem. Command lines executed will be logged using MissingH.Logging.Logger at the DEBUG level. Failure messages will be logged at the WARNING level in addition to being raised as an exception. Both are logged under "MissingH.Cmd.funcname" -- for instance, "MissingH.Cmd.safeSystem". If you wish to suppress these messages globally, you can simply run: updateGlobalLogger "MissingH.Cmd.safeSystem" (setLevel CRITICAL) See also: updateGlobalLogger, MissingH.Logging.Logger. | ||||||||||||||||||
pOpen :: PipeMode -> FilePath -> [String] -> (Handle -> IO a) -> IO a | ||||||||||||||||||
Open a pipe to the specified command. Passes the handle on to the specified function. The PipeMode specifies what you will be doing. That is, specifing ReadFromPipe sets up a pipe from stdin, and WriteToPipe sets up a pipe from stdout. | ||||||||||||||||||
pOpen3 | ||||||||||||||||||
| ||||||||||||||||||
Produced by Haddock version 0.6 |