#3649: inconsistent exception between unix/windows for running non-existant
program
-----------------------------+----------------------------------------------
Reporter:  duncan            |          Owner:                   
    Type:  bug               |         Status:  new              
Priority:  normal            |      Component:  libraries/process
 Version:  6.10.4            |       Severity:  normal           
Keywords:                    |       Testcase:                   
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple 
-----------------------------+----------------------------------------------
 {{{
 handle (print . isDoesNotExistError) $ do
   (_,_,_,hnd) <- createProcess (proc "foobar" [])
   print =<< waitForProcess hnd
 }}}

 On Windows this prints `True` since it throws a "does not exists" kind of
 IOException. On Unix instead the createProcess call succeeds and then
 waiting on the process claims it terminated with an exit code of 127.

 It is annoying that we need two different error handling mechanisms in
 this case. For example Cabal wants to know when it tries to run a program
 that cannot be found (eg when it tries to run sh.exe on Windows).

 It would be better if the behaviour was consistent. The behaviour on
 Windows seems to be the more sensible one. We should be able to make the
 Unix behaviour the same since the exceve call does indeed return an error
 code when loading the new executable image fails.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3649>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to