[GHC] #7327: Inconsistent behavior for relative paths in runProcess
GHC
cvs-ghc at haskell.org
Sat Oct 13 19:38:14 CEST 2012
#7327: Inconsistent behavior for relative paths in runProcess
------------------------------+---------------------------------------------
Reporter: snoyberg | Owner:
Type: bug | Status: new
Priority: normal | Component: libraries/process
Version: 7.6.1 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Testcase:
Blockedby: | Blocking:
Related: |
------------------------------+---------------------------------------------
This was initially reported as a bug in cabal:
https://github.com/haskell/cabal/issues/1058
The relevant fix demonstrates the issue:
https://github.com/snoyberg/cabal/commit/48082b90726093298df8559b365ed08805ca6d8f
It seems that on Linux, a relative path for the executable is derived from
the new working directory, whereas on Mac it is derived from the old
working directory. (I have not tested on other systems.) Ideally, the
behavior would be consistent across OSes, which IMO the more intuitive
behavior being the current Mac behavior. The simplest solution would be to
always turn the relative paths into absolute paths before changing working
directories. However, doing so may introduce a performance hit.
Alternatively, a documentation fix would be good so that it's at least
obvious that behavior is platform-specific. I can write a patch for either
the change in behavior or the updated documentation, I'd just like to know
which is preferred.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7327>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list