snoyberg · GitHub

Sorry for initial empty description...

When working on a library, I was surprised to find that the Handles 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.

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:

  1. Add clear documentation to createProcess indicating that it will close the Handle automatically.
  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.

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.

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.

Read the original on github.com ↗