ctrl+c and destructors

deadalnix deadalnix at gmail.com
Tue Oct 1 14:18:04 PDT 2013


On Tuesday, 1 October 2013 at 20:06:46 UTC, Maxim Fomin wrote:
> On Tuesday, 1 October 2013 at 18:16:27 UTC, Jacob Carlborg 
> wrote:
>> On 2013-10-01 13:19, PauloPinto wrote:
>>
>>> I just remember that you also have the added problem that 
>>> signal
>>> handlers are very limited in what you are allowed to do, with 
>>> the set of
>>> restrictions and guarantees not being portable across all 
>>> POSIX systems.
>>>
>>> Specially the tricks of notifying the application a signal 
>>> has happened,
>>> after signal returns and the whole story of redoing 
>>> interrupted system
>>> calls.
>>
>> druntime already handles SIGSEGV signals, at least for Linux:
>>
>> https://github.com/D-Programming-Language/druntime/blob/master/src/etc/linux/memoryerror.d
>
> Is this feature working as built-in or by demand?

By demand.

Call registerMemoryErrorHandler to enable it and 
deregisterMemoryErrorHandler to rollback.


More information about the Digitalmars-d mailing list