#4198: waitForProcess fails with "Bad file descriptor"
-------------------------------+--------------------------------------------
    Reporter:  yugr            |       Owner:                             
        Type:  bug             |      Status:  new                        
    Priority:  normal          |   Component:  libraries/process          
     Version:  6.12.3          |    Keywords:  waitForProcess             
          Os:  Windows         |    Testcase:                             
Architecture:  x86_64 (amd64)  |     Failure:  Incorrect result at runtime
-------------------------------+--------------------------------------------
 I am running this small sample program:
 {{{
 int main() { return -1; }
 }}}
 from this Haskell code (both from ghci and compiled):
 {{{
 import System.Process
 main = system "a.exe" >> putStrLn "This is not printed"
 }}}
 and get this error
 {{{
 tmp.exe: waitForProcess: invalid argument (Bad file descriptor)
 }}}

 I guess there is a runtime error inside system-call which crashes
 execution.

 I am on Windows 7, ghc 6.12.1. I tried both Cygwin g++ and MSVS cl C++
 compilers.

 One side question: is there any other way to run external program?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4198>
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