From 77df92f15db270a557cad6f3105fd09e3ddb6d97 Mon Sep 17 00:00:00 2001 From: Neil Mitchell Date: Sun, 22 Jan 2017 15:39:25 +0000 Subject: [PATCH 1/2] #82, remove the incorrect notes that Handle's are in binary mode. --- System/Process.hs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/System/Process.hs b/System/Process.hs index aec8786e..1276f9a0 100644 --- a/System/Process.hs +++ b/System/Process.hs @@ -774,8 +774,7 @@ runProcess cmd args mb_cwd mb_env mb_stdin mb_stdout mb_stderr = do {- | Runs a command using the shell, and returns 'Handle's that may be used to communicate with the process via its @stdin@, @stdout@, - and @stderr@ respectively. The 'Handle's are initially in binary - mode; if you need them to be in text mode then use 'hSetBinaryMode'. + and @stderr@ respectively. -} runInteractiveCommand :: String @@ -797,9 +796,6 @@ runInteractiveCommand string = > (inp,out,err,pid) <- runInteractiveProcess "..." > forkIO (hPutStr inp str) - - The 'Handle's are initially in binary mode; if you need them to be - in text mode then use 'hSetBinaryMode'. -} runInteractiveProcess :: FilePath -- ^ Filename of the executable (see 'RawCommand' for details) From f044a18aea16a46411b2639befdd1a9f6f7c4aaf Mon Sep 17 00:00:00 2001 From: Neil Mitchell Date: Sun, 22 Jan 2017 15:39:57 +0000 Subject: [PATCH 2/2] #82, note that all created handles are in text mode. --- System/Process.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/System/Process.hs b/System/Process.hs index 1276f9a0..0fc34454 100644 --- a/System/Process.hs +++ b/System/Process.hs @@ -178,7 +178,8 @@ Note that @Handle@s provided for @std_in@, @std_out@, or @std_err@ via the @UseHandle@ constructor will be closed by calling this function. This is not always the desired behavior. In cases where you would like to leave the @Handle@ open after spawning the child process, please use 'createProcess_' -instead. +instead. All created @Handle@s are initially in text mode; if you need them +to be in binary mode then use 'hSetBinaryMode'. -} createProcess