ctrl+c and destructors
deadalnix
deadalnix at gmail.com
Mon Sep 30 11:44:36 PDT 2013
On Monday, 30 September 2013 at 02:13:47 UTC, H. S. Teoh wrote:
> Well, ctrl-C can be handled, so the way I'd do it is to set up
> a signal
> handler for SIGINT and have it write something to a self-pipe
> read by
> the event handler, then the event handler can throw an
> Exception (which
> should cause dtors to run as the stack unwinds).
>
No you can't.
But you somehow can, if you want to use some black magic :
http://www.deadalnix.me/2012/03/24/get-an-exception-from-a-segfault-on-linux-x86-and-x86_64-using-some-black-magic/
More information about the Digitalmars-d
mailing list