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 */
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