Are there best practices and code snippets available which show how I can handle Ctrl+C in a Delphi console application?

I have found some articles which give some information about possible problems with the debugger, with exception handling, unloading of DLLs, closing of stdin, and finalization [for example this CodeGear forums thread](https://forums.codegear.com/thread.jspa?threadID=15832).