[GHC] #9322: Modify readProcess[WithExitCode] to allow setting current directory
GHC
ghc-devs at haskell.org
Thu Jul 17 08:08:14 UTC 2014
#9322: Modify readProcess[WithExitCode] to allow setting current directory
-------------------------------------+-------------------------------------
Reporter: blitzcode | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 7.10.1
Component: | Version: 7.8.3
libraries/process | Differential Revisions:
Keywords: | Architecture:
Operating System: Unknown/Multiple | Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Easy (less
Test Case: | than 1 hour)
Blocking: | Blocked By:
| Related Tickets:
-------------------------------------+-------------------------------------
The readProcess[WithExitCode] function does not allow to modify the
working directory parameter passed to createProcess.
The documentation states 'readProcess and readProcessWithExitCode are
fairly simple wrappers around createProcess. Constructing variants of
these functions is quite easy'. I would call that a boldfaced lie, as the
implementation of readProcess[WithExitCode] and its web of required,
hidden helper functions spans multiple screen pages of subtle and error
prone code. Just look at the numerous bug reports for it. It would seem
rather unfortunate to extract and copy paste all of this from
System.Process just to provide a working directory to a newly created
process.
Maybe the call should be changed to simply specify a default CreateProcess
record so all things like cwd/env could be customized?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9322>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list