Copyright | Copyright (C) 2013-2016 John MacFarlane |
---|---|
License | GNU GPL, version 2 or above |
Maintainer | John MacFarlane <jgm@berkeley.edu> |
Stability | alpha |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell98 |
ByteString variant of readProcessWithExitCode
.
- pipeProcess :: Maybe [(String, String)] -> FilePath -> [String] -> ByteString -> IO (ExitCode, ByteString, ByteString)
Documentation
:: Maybe [(String, String)] | environment variables |
-> FilePath | Filename of the executable (see |
-> [String] | any arguments |
-> ByteString | standard input |
-> IO (ExitCode, ByteString, ByteString) | exitcode, stdout, stderr |
Version of readProcessWithExitCode
that uses lazy bytestrings
instead of strings and allows setting environment variables.
readProcessWithExitCode
creates an external process, reads its
standard output and standard error strictly, waits until the process
terminates, and then returns the ExitCode
of the process,
the standard output, and the standard error.
If an asynchronous exception is thrown to the thread executing
readProcessWithExitCode
, the forked process will be terminated and
readProcessWithExitCode
will wait (block) until the process has been
terminated.