Is it safe to call getProcessExitCode more than once?

Peter Simons simons at cryp.to
Tue Oct 26 06:42:34 EDT 2004


John Goerzen writes:

 > Assuming it is based on wait() or one of its derivatives,
 > and I suspect it is, you cannot call it more than once
 > for a single process.

That's what I _assume_, too, but a definite answer would be
nice. 

In the meanwhile, I have found out that it might not be safe
to call it once, even:

  CaughtException waitForProcess: does not exist (No child processes)

That's a child I _did_ start and which apparently terminated
before I called waitForProcess. Shouldn't I be getting the
exit code of that process rather than an exception?

Do waitForProcess and getProcessExitCode differ in their
behavior other than that one blocks and other doesn't?

Peter



More information about the Glasgow-haskell-users mailing list