From 77db46359eb12473020ccd6acd4e55a7f7aaaf18 Mon Sep 17 00:00:00 2001 From: counterpoint Date: Wed, 8 Jul 2015 08:52:07 +0100 Subject: [PATCH] Change poll control failures to use SIGABRT rather than assert(false). --- server/core/poll.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/server/core/poll.c b/server/core/poll.c index a7afa9345..4123e0294 100644 --- a/server/core/poll.c +++ b/server/core/poll.c @@ -446,12 +446,14 @@ poll_resolve_error(DCB *dcb, int errornum, bool adding) } } /* Common checks for add or remove - crash MaxScale */ - if (EBADF == errornum) assert (!(EBADF == errornum)); - if (EINVAL == errornum) assert (!(EINVAL == errornum)); - if (ENOMEM == errornum) assert (!(ENOMEM == errornum)); - if (EPERM == errornum) assert (!(EPERM == errornum)); + if (EBADF == errornum) raise(SIGABRT); + if (EINVAL == errornum) raise(SIGABRT); + if (ENOMEM == errornum) raise(SIGABRT); + if (EPERM == errornum) raise(SIGABRT); /* Undocumented error number */ raise(SIGABRT); + /* The following statement should never be reached, but avoids compiler warning */ + return -1; } #define BLOCKINGPOLL 0 /*< Set BLOCKING POLL to 1 if using a single thread and to make