ctrl+c and destructors

Sean Kelly sean at invisibleduck.org
Sat Oct 5 16:33:40 PDT 2013


On Oct 5, 2013, at 4:09 PM, Andrej Mitrovic <andrej.mitrovich at gmail.com> wrote:
> 
>> On 9/30/13, Adam D. Ruppe <destructionator at gmail.com> wrote:
>> Is there anything we can do to automatically clean up if the user
>> hits ctrl+c on Linux?
> 
> What's interesting is I just ran into this SEH enum in druntime for
> win32 by chance:
> CONTROL_C_EXIT
> 
> But there's no equivalent for linux.

You need to trap SIGINT. But then you're stuck in a signal handler and so can't do much to clean up. 


More information about the Digitalmars-d mailing list