Signal problem
Tim McClarren
tim at idle-games.com
Sat Jan 9 19:03:03 CET 2010
On 1/9/10 1:30 AM, Marc Lehmann wrote:
> On Fri, Jan 08, 2010 at 10:55:43AM -0800, Tim McClarren<tim at idle-games.com> wrote:
>>> So what do you expect? There is no portable way to continue from
>>> segfaults, and segfaults are asynchronous.
>>
>> Yes. I was under the impression from the documentation that the purpose
>> of ev_signal was to attempt to deliver asynchronous signals
>> synchronously.
>
> Exactly - so what do you expect?
I'd expect libev to not catch it, I think... if the behavior of the
example code is as intended, let's leave it at that. I'm not sure I'm
an idiot for thinking it might call back into the handler on SEGV. If
there was absolutely no reason for you to ever have a handler for SEGV,
then I'm guessing that the POSIX spec. would treat it the same as SIGKILL.
> sigsegv cannot be recovered, so there is no way to make it synchronous to
> your event loop. you already know thta, so why bother?
>
>> I am trying to emit a stack to the log. I've done this before, via the
>> usually sigaction route.
>
> Again, you know you can't continue, so why bother?
Because I want the call stack? And yes, I came to the realization that
I was being pretty daft about the stack at the time libev would call
back in to my handler. I came to that realization after I had already
started investigating why said callback never comes.
Anyways, changing back to using sigaction for getting the stack is easy
enough.
More information about the libev
mailing list