Change poll control failures to use SIGABRT rather than assert(false).

This commit is contained in:
counterpoint
2015-07-08 08:52:07 +01:00
parent c50308fba5
commit 77db46359e

View File

@ -446,12 +446,14 @@ poll_resolve_error(DCB *dcb, int errornum, bool adding)
} }
} }
/* Common checks for add or remove - crash MaxScale */ /* Common checks for add or remove - crash MaxScale */
if (EBADF == errornum) assert (!(EBADF == errornum)); if (EBADF == errornum) raise(SIGABRT);
if (EINVAL == errornum) assert (!(EINVAL == errornum)); if (EINVAL == errornum) raise(SIGABRT);
if (ENOMEM == errornum) assert (!(ENOMEM == errornum)); if (ENOMEM == errornum) raise(SIGABRT);
if (EPERM == errornum) assert (!(EPERM == errornum)); if (EPERM == errornum) raise(SIGABRT);
/* Undocumented error number */ /* Undocumented error number */
raise(SIGABRT); 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 #define BLOCKINGPOLL 0 /*< Set BLOCKING POLL to 1 if using a single thread and to make