ctrl+c and destructors

Sean Kelly sean at invisibleduck.org
Wed Oct 2 20:07:53 PDT 2013


On Oct 2, 2013, at 6:15 PM, "Adam D. Ruppe" <destructionator at gmail.com> wrote:
> 
>> On Thursday, 3 October 2013 at 00:25:26 UTC, Walter Bright wrote:
>> Although I haven't seen the system you describe, I'm very skeptical that it found the solution to the problem of a program successfully continuing after it has crashed due to program bugs. I remain firmly convinced that that is an utterly wrong and doomed approach to the problem of reliability.
> 
> Segfaults aren't necessarily bugs... though I'm not sure if a userspace handler can do much about it. But from a kernel perspective, they can be generated by page faults too, which can be successfully handled by loading the requested memory block (e.g. from a swap file) and then retrying the operation, or copying the page into a writable location and mapping that in; hardware assisted copy-on-write.
> 
> I've never tried to do this in a unix program so I don't know how much you can do, but presumably Sean's example did something along these lines, so it would be by design rather than bugs.

This exactly. It goes a bit beyond what Posix allows in signal handlers, but it works just fine on this particular system. 


More information about the Digitalmars-d mailing list