From: Martin Mares Date: Fri, 15 Dec 2006 15:02:19 +0000 (+0100) Subject: Fixed bug in signal handling. X-Git-Tag: holmes-import~506^2~13^2~191 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=5e52d50a1ae65de7545213b433e06e993e2d24bf;p=libucw.git Fixed bug in signal handling. (The signal handler table needn't be defined in the current thread at this point.) --- diff --git a/lib/sighandler.c b/lib/sighandler.c index 4991f9a3..2739ba10 100644 --- a/lib/sighandler.c +++ b/lib/sighandler.c @@ -19,7 +19,7 @@ static void signal_handler_internal(int sig) { struct ucwlib_context *ctx = ucwlib_thread_context(); - if (!ctx->signal_handlers[sig] || ctx->signal_handlers[sig](sig)) + if (!ctx->signal_handlers || !ctx->signal_handlers[sig] || ctx->signal_handlers[sig](sig)) abort(); }