unix-process-conduit-0.1.0.1: Run processes on Unix systems, with a conduit interface

Safe HaskellNone

Data.Conduit.Process.Unix

Synopsis

Documentation

forkExecuteFileSource

Arguments

:: ByteString

command

-> Bool

search on PATH?

-> [ByteString]

args

-> Maybe [(ByteString, ByteString)]

environment

-> Maybe ByteString

working directory

-> Maybe (Source IO ByteString)

stdin

-> Maybe (Sink ByteString IO ())

stdout

-> Maybe (Sink ByteString IO ())

stderr

-> IO ProcessID 

Fork a new process and execute the given command.

This is a wrapper around with fork() and exec*() syscalls, set up to work with conduit datatypes for standard input, output, and error. If Nothing is provided for any of those arguments, then the original file handles will remain open to the child process.

If you would like to simply discard data provided by the child process, provide sinkNull for stdout and/or stderr. To provide an empty input stream, use return ().

Since 0.1.0

killProcess :: ProcessID -> IO ()Source

Kill a process by sending it the KILL (9) signal.

Since 0.1.0

waitForProcess :: ProcessID -> IO ProcessStatusSource

Wait until the given process has died, and return its ProcessStatus.

Since 0.1.0