[GHC] #5212: waitForProcess: does not exist (No child processes)

GHC cvs-ghc at haskell.org
Tue May 24 11:30:04 CEST 2011


#5212: waitForProcess: does not exist (No child processes)
-------------------------------+--------------------------------------------
    Reporter:  chrisdone       |       Owner:  chrisdone                  
        Type:  bug             |      Status:  new                        
    Priority:  normal          |   Component:  GHC API                    
     Version:  6.12.3          |    Keywords:                             
    Testcase:                  |   Blockedby:                             
          Os:  Linux           |    Blocking:                             
Architecture:  x86_64 (amd64)  |     Failure:  Incorrect result at runtime
-------------------------------+--------------------------------------------
 I have this error when launching a program on our REHL prod machine.

 {{{
 waitForProcess: does not exist (No child processes)
 }}}

 This is called inside `readProcess`. I am unable to reproduce it on our
 REHL dev machine, and my local Ubuntu machine. If I re-implement
 `readProcess` with the same source but remove `waitForProcess` line, I do
 get standard output. Launching the program is successful.

 The problem stems from `waitForProcess` expecting a process and somehow
 there isn't one. I didn't think this would be a problem, because
 `waitForProcess` itself doesn't throw such an exception, and it *does*
 handle the process having ended (of course), which is trivial to confirm
 locally:

 {{{
 λ> (inh,outh,_,pid) <- createProcess (proc "date" [])
 Tue May 24 11:19:59 CEST 2011
 λ> waitForProcess pid
 ExitSuccess
 λ>
 }}}

 So perhaps it's in `withProcessHandle`, which I don't have access to in
 the Haddock docs. I don't really know what would cause this error. Ideas?

 We're using GHC 6.12.3 (I know, not recent). I'd provide a test-case but I
 can't even reproduce it on my own machine. I don't have direct shell
 access to the prod machine. The test-case would essentially be "use
 readProcess", anyway.

 I can assign this to me and I'll see if the problem persists when we
 upgrade to GHC7. FWIW if you want to reproduce the exact case I tried,
 here it is:

 {{{
 readProcess "pdfinfo" ["--help"] ""
 }}}

 {{{
 $ pdfinfo -v
 pdfinfo version 3.00
 Copyright 1996-2004 Glyph & Cog, LLC
 }}}

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



More information about the Glasgow-haskell-bugs mailing list