[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: pairs(t, skey) and ipairs(t, skey)
- From: Sean Conner <sean@...>
- Date: Thu, 3 Oct 2013 22:19:44 -0400
It was thus said that the Great Robert Virding once stated:
>
> > From: "Sean Conner" <sean@conman.org>
> >
> > At one point, a daemon I wrote [1] would catch SIGSEGV, log the condition,
> > save its current state and exit. And yes, it did just that. Then I
> > realized: if the program generated a SIGSEGV, it was most likely due to a
> > programming error leading to subtle memory corruption and thus, the state
> > I'm saving out could potentially be bogus (garbage in, garbage out). Better
> > to just log the condition and exit and skip saving any data. Even
> > better---don't bother with catching the SIGSEGV. Instead, have a parent
> > process wait for the child to exit, and report the SIGSEGV that way [2].
>
> Interesting. This is the standard way in which errors are handled in
> Erlang: crash the process and let someone else (another process) catch it
> and clean up after it. It works.
Yes, that's where I got the concept from---Erlang.
-spc (Played a bit with Erlang; nice language except the string processing
is even worse than C's string processing ... )
- References:
- Re: pairs(t, skey) and ipairs(t, skey), Dirk Laurie
- Re: pairs(t, skey) and ipairs(t, skey), Paul K
- Re: pairs(t, skey) and ipairs(t, skey), Luiz Henrique de Figueiredo
- Re: pairs(t, skey) and ipairs(t, skey), Tim Hill
- Re: pairs(t, skey) and ipairs(t, skey), Luiz Henrique de Figueiredo
- Re: pairs(t, skey) and ipairs(t, skey), Tim Hill
- Re: pairs(t, skey) and ipairs(t, skey), Sean Conner
- Re: pairs(t, skey) and ipairs(t, skey), Robert Virding