
#9393: execvpe should handle ENOTDIR -------------------------------------+------------------------------------- Reporter: iquiw | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries/unix | Version: 7.8.2 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Blocked By: | None/Unknown Related Tickets: | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- If PATH environment variable contains non directory component, execvpe fails by ENOTDIR. For example, if "/tmp/foo" is a regular file, the following program fails with PATH contains "/tmp/foo". {{{ module Main where import System.Environment import System.Posix.Process main :: IO () main = do env <- getEnvironment executeFile "echo" True [] (Just env) return () }}} {{{ $ PATH=/tmp/foo:$PATH runghc a.hs a.hs: echo: executeFile: inappropriate type (Not a directory) }}} See for example, https://github.com/haskell/cabal/issues/1723 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9393 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler