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:
- Add clear documentation to
createProcess indicating that it will close the Handle automatically.
- 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.
Sorry for initial empty description...
When working on a library, I was surprised to find that the
Handles that I passed in forstd_in,std_outandstd_errviaUseHandlewere 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 theHandleto remain open after the process runs to completion.The function
createProcess_in the.Internalsmodule has the behavior I was looking for, and for my purpose, I can simply import from there. I'd like to propose two changes:createProcessindicating that it will close theHandleautomatically.System.Processwith the semantics ofcreateProcess_. I'm open to bikeshedding on the name, but perhaps sticking withcreateProcess_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.