ev_signal and SIGSEGV, SIGABRT

Zsbán Ambrus ambrus at math.bme.hu
Wed Sep 12 20:52:40 CEST 2012

On 9/12/12, Konstantin Osipov <kostja at tarantool.org> wrote:
> Am I getting it right that it would be incorrect to use libev
> ev_signal API to handle SIGSEGV?
> In particular, libev will try to handle this synchronously, and
> invoke the signal callback in some undefined order, possibly after some
> other callback is invoked.

Correct.  If you try, libev's signal handler function will return
without doing anything about the SEGV, which is definitely an error
and undefined behavior.  Your thread would likely get stuck in an
infinite loop as the instruction that has caused the SEGV is retried
and raises SEGV again.


More information about the libev mailing list