Is it safe to call getProcessExitCode more than once?

Glynn Clements glynn at
Thu Oct 28 01:46:01 EDT 2004

Peter Simons wrote:

>  > Both [waitForProcess and getProcessExitCode] will throw
>  > an exception if the process terminated on a signal.
> So if I terminate a process manually, I'll have to wait for
> the ExitCode to avoid a zombie process, and waiting for the
> ExitCode invariably throws an exception.
> Or do I misunderstand something?

No, that seems correct.

Although, depending upon the OS, setting SIGCHLD to SIG_IGN may cause
processes to be reaped automatically (i.e. not become zombies), so
that's a possible alternative.

Glynn Clements <glynn at>

More information about the Glasgow-haskell-users mailing list