[Haskell-beginners] Cleaning up after the Close button is pressed
Colin Hume
lightwing15 at hotmail.com
Sat Jan 15 20:16:11 CET 2011
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110115/ba190660/attachment.htm>
More information about the Beginners
mailing list