pandoc-1.12.4.1: Conversion between markup formats

CopyrightCopyright (C) 2013-2014 John MacFarlane
LicenseGNU GPL, version 2 or above
MaintainerJohn MacFarlane <jgm@berkeley.edu>
Stabilityalpha
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell98

Text.Pandoc.Process

Description

ByteString variant of readProcessWithExitCode.

Synopsis

Documentation

pipeProcess

Arguments

:: Maybe [(String, String)]

environment variables

-> FilePath

Filename of the executable (see proc for details)

-> [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.