<br><br><div class="gmail_quote">On Tue Nov 25 2014 at 12:27:26 PM Michael Snoyman <<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I originally opened this as a Github issue[1] about this, but due to lack of attention, Herbert recommended that I send it to the libraries list as well. Here's the issue description copied verbatim from Github:<div><br></div><div><div>When working on a library, I was surprised to find that the `Handle`s that I passed in for `std_in`, `std_out` and `std_err` via `UseHandle` were automatically closed. This is not clear from the documentation, and- at least for the use case I was interested in- the opposite of what I needed. There are valid cases where we'd want the `Handle` to remain open after the process runs to completion.<br></div><div><br></div><div>The function `createProcess_` in the `.Internals` module has the behavior I was looking for, and for my purpose, I can simply import from there. I'd like to propose two changes:</div><div><br></div><div>1. Add clear documentation to `createProcess` indicating that it will close the `Handle` automatically.</div><div>2. Add a new function to be exported from `System.Process` with the semantics of `createProcess_`. I'm open to bikeshedding on the name, but perhaps sticking with `createProcess_` makes the most sense.</div><div><br></div><div>Note that I do *not* think we should change the existing semantics of `createProcess`: I think it's a large breaking change, and should be avoided.</div><div><br></div><div>I'm happy to provide pull requests for both of these, I just wanted to check if there was objection before going ahead with it.</div><div><br></div><div>Michael</div><div><br></div><div>[1] <a href="https://github.com/haskell/process/issues/2" target="_blank">https://github.com/haskell/process/issues/2</a></div></div></blockquote><div><br></div><div>Since it seems that there's no objection to exposing createProcess_ as a short term solution, I've put together a pull request[1]. The only code change is exposing createProcess_; all other changes are documentation.</div><div><br></div><div>Michael</div><div><br></div><div>[1] <a href="https://github.com/haskell/process/pull/12">https://github.com/haskell/process/pull/12</a> </div></div>