GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T18:40:35Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/9393execvpe should handle ENOTDIR2019-07-07T18:40:35Ziquiwexecvpe should handle ENOTDIRIf 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.Envi...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
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 7.8.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/unix |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"execvpe should handle ENOTDIR","status":"New","operating_system":"","component":"libraries/unix","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.8.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"If PATH environment variable contains non directory component,\r\nexecvpe fails by ENOTDIR.\r\n\r\nFor example, if \"/tmp/foo\" is a regular file, the following program fails with PATH contains \"/tmp/foo\".\r\n{{{\r\nmodule Main where\r\n\r\nimport System.Environment\r\nimport System.Posix.Process\r\n\r\nmain :: IO ()\r\nmain = do\r\n env <- getEnvironment\r\n executeFile \"echo\" True [] (Just env)\r\n return ()\r\n}}}\r\n\r\n{{{\r\n$ PATH=/tmp/foo:$PATH runghc a.hs \r\na.hs: echo: executeFile: inappropriate type (Not a directory)\r\n}}}\r\n\r\nSee for example, https://github.com/haskell/cabal/issues/1723","type_of_failure":"OtherFailure","blocking":[]} -->7.10.1https://gitlab.haskell.org/ghc/ghc/-/issues/8621Pull request for inclusion in `unix' module of fsync(2), fdatasync(2), posix_...2019-07-07T18:44:14ZjimenezrickPull request for inclusion in `unix' module of fsync(2), fdatasync(2), posix_fadvise(2) and posix_fallocate(2)Discussion in the mailing list (I fixed both commented silly issues):
http://www.haskell.org/pipermail/libraries/2013-December/021756.html
Please review this pull request:
https://github.com/jimenezrick/unix/compare/master...file-utils....Discussion in the mailing list (I fixed both commented silly issues):
http://www.haskell.org/pipermail/libraries/2013-December/021756.html
Please review this pull request:
https://github.com/jimenezrick/unix/compare/master...file-utils.patch
If you find interesting this patch, then:
git pull https://github.com/jimenezrick/unix.git file-utils
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 7.6.3 |
| Type | Task |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/unix |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Pull request for inclusion in `unix' module of fsync(2), fdatasync(2), posix_fadvise(2) and posix_fallocate(2)","status":"New","operating_system":"","component":"libraries/unix","related":[],"milestone":"7.8.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Task","description":"Discussion in the mailing list (I fixed both commented silly issues):\r\nhttp://www.haskell.org/pipermail/libraries/2013-December/021756.html\r\n\r\nPlease review this pull request:\r\nhttps://github.com/jimenezrick/unix/compare/master...file-utils.patch\r\n\r\nIf you find interesting this patch, then:\r\ngit pull https://github.com/jimenezrick/unix.git file-utils","type_of_failure":"OtherFailure","blocking":[]} -->7.10.1https://gitlab.haskell.org/ghc/ghc/-/issues/5942implement POSIX confstr() in System/Posix/Unistd.hsc2019-07-07T18:52:54Zclintimplement POSIX confstr() in System/Posix/Unistd.hsc<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 7.4.1 |
| Type | FeatureRequest |
| TypeOfFailure ...<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 7.4.1 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/unix |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"implement POSIX confstr() in System/Posix/Unistd.hsc","status":"New","operating_system":"","component":"libraries/unix","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.4.1","keywords":["confstr"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"","type_of_failure":"OtherFailure","blocking":[]} -->7.10.1Edward KmettEdward Kmett