process-conduit-0.5.0.1: Conduits for processes

Safe HaskellSafe-Infered

Data.Conduit.Process

Contents

Synopsis

Run process

Run shell command

sourceCmd :: MonadResource m => String -> GSource m ByteStringSource

Source of shell command

conduitCmd :: MonadResource m => String -> GConduit ByteString m ByteStringSource

Conduit of shell command

Convenience re-exports

shell :: String -> CreateProcess

Construct a CreateProcess record for passing to createProcess, representing a command to be passed to the shell.

proc :: FilePath -> [String] -> CreateProcess

Construct a CreateProcess record for passing to createProcess, representing a raw command with arguments.

data CreateProcess

Constructors

CreateProcess 

Fields

cmdspec :: CmdSpec

Executable & arguments, or shell command

cwd :: Maybe FilePath

Optional path to the working directory for the new process

env :: Maybe [(String, String)]

Optional environment (otherwise inherit from the current process)

std_in :: StdStream

How to determine stdin

std_out :: StdStream

How to determine stdout

std_err :: StdStream

How to determine stderr

close_fds :: Bool

Close all file descriptors except stdin, stdout and stderr in the new process (on Windows, only works if std_in, std_out, and std_err are all Inherit)

create_group :: Bool

Create a new process group

data CmdSpec

Constructors

ShellCommand String

a command line to execute using the shell

RawCommand FilePath [String]

the filename of an executable with a list of arguments

data StdStream

Constructors

Inherit

Inherit Handle from parent

UseHandle Handle

Use the supplied Handle

CreatePipe

Create a new pipe. The returned Handle will use the default encoding and newline translation mode (just like Handles created by openFile).