[Haskell-cafe] terminateProcess leaves zombie processes around

Donn Cave donn at avvanta.com
Wed Dec 7 16:39:55 CET 2011


Quoth Felipe Almeida Lessa <felipe.lessa at gmail.com>,
> On Wed, Dec 7, 2011 at 1:19 PM, Brandon Allbery <allbery.b at gmail.com> wrote:
>> They *do* terminate; a zombie is a dead process waiting for its parent to
>> reap it with waitForProcess.  There's also some POSIX stuff you can do to
>> have them auto-reaped, but doing that correctly and portably is somewhat
>> painful.
>
> But zombie processes do consume a row in the process table, right?  If
> so, then it's bad to have them around.

Correct.  As noted above, clean up with waitForProcess to release this
resource.  If it's more convenient, that could be done up front, by
forking twice and waiting for the intermediate process.  One possibly
convenient way to do that might be something like runCommand "eprover &".

	Donn



More information about the Haskell-Cafe mailing list