Poll: System.exitWith behaviour
Manuel M. T. Chakravarty
Fri, 25 May 2001 10:56:36 +1000
"Simon Marlow" <firstname.lastname@example.org> wrote,
> > I think, having the third point is good, because the Haskell
> > report requires that
> > Computation exitWith code terminates the program,
> > returning code to the program's caller.
> Either way we still conform to the report in the case of a single
> threaded program (actually, we've already deviated from the report in
> allowing you to catch the ExitException and carry on).
> For a multi-threaded program, it's not clear to me what exitWith should
> do. What should happen if a Haskell callback invokes exitWith? Should
> it terminate the Haskell main thread?
> I must admit I'm leaning more towards omitting the third point, and
> that's what I've implemented for now.
If you call exit() in a multi-threaded C program, it is also