-
Notifications
You must be signed in to change notification settings - Fork 90
Closed
Description
It would be useful to have versions of readProcess etc. that support binary IO on stdin/stdout.
Proposed solution: a new module (intended to be imported qualified alongside System.Process) with the following signature:
module System.Process.Binary where
import Data.ByteString.Lazy (ByteString)
readProcess :: FilePath -> [String] -> ByteString -> IO ByteString
readCreateProcess :: CreateProcess -> ByteString -> IO ByteString
readProcessWithExitCode :: FilePath -> [String] -> ByteString -> IO (ExitCode,ByteString,ByteString)
readCreateProcessWithExitCode :: CreateProcess -> ByteString -> IO (ExitCode,ByteString,ByteString)Additionally, I propose adding a new constructor CreateBinaryPipe to the StdStream data type (CreateBinaryPipe would be to CreatePipe as openBinaryFile is to openFile).
If there are no objections, I'd be happy to implement this myself and submit a patch. Note that it would require adding bytestring as a package dependency.
Metadata
Metadata
Assignees
Labels
No labels