
Hi everyone, I have to perform cleanup when my application terminates. GHC.ConsoleHandler handles cleanup from Ctrl-C and Ctrl-Break very nicely under Windows. Unfortunately, the RTS does not support delivery of the Close button event. The reason given in rts/win32/ConsoleHandler.c is that an improperly-written Haskell handler will prevent the user from being able to kill the application. I have a few questions about this. 1) Is there a different way of cleaning up on Windows after the Close button is pressed? 2) It seems strange that GHC intentionally prevents the application from cleaning up in order to guarantee that it will terminate as the user expects. Why is it not the application developer's responsibility to ensure that it can be killed? Thanks, Colin