[commit: packages/unix] master, safefixes710again: Retry process execution in case of ENOTDIR (558b0fb)

git at git.haskell.org git at git.haskell.org
Thu Mar 19 15:50:42 UTC 2015


Repository : ssh://git@git.haskell.org/unix

On branches: master,safefixes710again
Link       : http://ghc.haskell.org/trac/ghc/changeset/558b0fb4eaa4aebc823022b3e1d560da3faad658/unix

>---------------------------------------------------------------

commit 558b0fb4eaa4aebc823022b3e1d560da3faad658
Author: Iku Iwasa <iku.iwasa at gmail.com>
Date:   Sat Aug 2 22:02:23 2014 +0900

    Retry process execution in case of ENOTDIR
    
    If `PATH` environment variable contains non directory component,
    `__hsunix_execvpe()` failed by `ENOTDIR`.
    
    This fixes #11 for all platforms.


>---------------------------------------------------------------

558b0fb4eaa4aebc823022b3e1d560da3faad658
 cbits/execvpe.c | 1 +
 changelog.md    | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/cbits/execvpe.c b/cbits/execvpe.c
index 8c9d52d..b4f9472 100644
--- a/cbits/execvpe.c
+++ b/cbits/execvpe.c
@@ -129,6 +129,7 @@ __hsunix_execvpe(const char *name, char *const argv[], char *const envp[])
 	case EACCES:
 	    eacces = 1;
 	    break;
+	case ENOTDIR:
 	case ENOENT:
 	    break;
 	case ENOEXEC:
diff --git a/changelog.md b/changelog.md
index d5100cf..b7dafcd 100644
--- a/changelog.md
+++ b/changelog.md
@@ -14,6 +14,9 @@
 
   * Use CAPI FFI import for `truncate` to make sure the LFS-version is used.
 
+  * `executeFile`: Fix `ENOTDIR` error for entries with non-directory
+    components in `PATH` (and instead skip over non-directory `PATH`-elements)
+
 ## 2.7.0.1  *Mar 2014*
 
   * Bundled with GHC 7.8.1



More information about the ghc-commits mailing list