Documentation of System.Process

Simon Marlow marlowsd at gmail.com
Mon Nov 29 06:51:31 EST 2010


On 26/11/2010 10:00, Jean-Marie Gaillourdet wrote:
> Hi all,
>
> I've been searching information regarding file handles to pipes created by System.Process.createProcess. The documentation does not state whether they are in binary mode, i.e. whether they have line ending conversion or an encoding enabled. That kind of information is available for runInteractiveCommand in the same module. runInteractiveCommand opens all pipes in binary mode. I've concluded from the source of that module that the same is probably true for createProcess. I've two questions now:
>
> 1. Is it correct that createProcess returns file handles in binary mode when creating pipes?

No, in fact the Handles use localeEncoding and nativeNewlineMode by 
default.  You can use hSetBinaryMode if you want no encoding or newline 
translation.

> 2. Could you add that information to the haddock docs?

Yes.

> Is their some other place where I could have found this?

The source :-)

Cheers,
	Simon




More information about the Glasgow-haskell-users mailing list