[GHC] #7327: Inconsistent behavior for relative paths in runProcess

GHC cvs-ghc at haskell.org
Fri Apr 26 01:07:26 CEST 2013


#7327: Inconsistent behavior for relative paths in runProcess
----------------------------------+-----------------------------------------
    Reporter:  snoyberg           |       Owner:                  
        Type:  bug                |      Status:  infoneeded      
    Priority:  normal             |   Milestone:  7.8.1           
   Component:  libraries/process  |     Version:  7.6.1           
    Keywords:                     |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple   |     Failure:  None/Unknown    
  Difficulty:  Unknown            |    Testcase:                  
   Blockedby:                     |    Blocking:                  
     Related:                     |  
----------------------------------+-----------------------------------------
Changes (by tibbe):

 * cc: johan.tibell@… (added)


Comment:

 I tried to reproduce the problem, but unfortunately I get a segfault!:

 {{{
 $ cd tmp
 $ cat > q.hs
 import System.Process

 main :: IO ()
 main = do ph <- runProcess "./runme.sh" [] (Just "sub")
                            Nothing Nothing Nothing Nothing
           ec <- waitForProcess ph
           print ec
 $ cat > runme.sh
 #!/bin/sh

 echo Running root
 $ mkdir sub
 $ cat > sub/runme.sh
 #!/bin/sh

 echo Running in sub
 $ ghc --make q
 [1 of 1] Compiling Main             ( q.hs, q.o )
 Linking q ...
 $ ./q
 ExitFailure 127
 $ ghc --info
  [("Project name","The Glorious Glasgow Haskell Compilation System")
  ,("GCC extra via C opts"," -fwrapv")
  ,("C compiler command","/usr/bin/gcc")
  ,("C compiler flags"," -m64 -fno-stack-protector  -m64")
  ,("ar command","/usr/bin/ar")
  ,("ar flags","clqs")
  ,("ar supports at file","@ArSupportsAtFile@")
  ,("touch command","touch")
  ,("dllwrap command","/bin/false")
  ,("windres command","/bin/false")
  ,("perl command","/usr/bin/perl")
  ,("target os","OSDarwin")
  ,("target arch","ArchX86_64")
  ,("target word size","8")
  ,("target has GNU nonexec stack","False")
  ,("target has .ident directive","True")
  ,("target has subsections via symbols","True")
  ,("LLVM llc command","llc")
  ,("LLVM opt command","opt")
  ,("Project version","7.6.2")
  ,("Booter version","7.4.2")
  ,("Stage","2")
  ,("Build platform","x86_64-apple-darwin")
  ,("Host platform","x86_64-apple-darwin")
  ,("Target platform","x86_64-apple-darwin")
  ,("Have interpreter","YES")
  ,("Object splitting supported","YES")
  ,("Have native code generator","YES")
  ,("Support SMP","YES")
  ,("Unregisterised","NO")
  ,("Tables next to code","YES")
  ,("RTS ways","l debug  thr thr_debug thr_l thr_p dyn debug_dyn thr_dyn
 thr_debug_dyn")
  ,("Leading underscore","YES")
  ,("Debug on","False")
  ,("LibDir","/usr/local/lib/ghc-7.6.2")
  ,("Global Package DB","/usr/local/lib/ghc-7.6.2/package.conf.d")
  ,("Gcc Linker flags","[\"-m64\"]")
  ,("Ld Linker flags","[\"-arch\",\"x86_64\"]")
  ]
 }}}

 OS X 10.8.3.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7327#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list