waitForProcess: does not exist (No child processes)
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
Trac metadata
Trac field | Value |
---|---|
Version | 6.12.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | GHC API |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |