Commit f69c1c9d authored by Daniel Black's avatar Daniel Black

MDEV-19508: SI_KERNEL is not on all implementations

SI_USER is, however in FreeBSD there are a couple of non-kernel
user signal infomations above SI_KERNEL.

Put a fallback just in case there is nothing available.
parent 5b71e042
...@@ -197,7 +197,6 @@ static inline int my_sigwait(sigset_t *set, int *sig, int *code) ...@@ -197,7 +197,6 @@ static inline int my_sigwait(sigset_t *set, int *sig, int *code)
*code= siginfo.si_code; *code= siginfo.si_code;
return *sig < 0 ? errno : 0; return *sig < 0 ? errno : 0;
#else #else
#define SI_KERNEL 128
*code= 0; *code= 0;
return sigwait(set, sig); return sigwait(set, sig);
#endif #endif
......
...@@ -3253,7 +3253,13 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused))) ...@@ -3253,7 +3253,13 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused)))
} }
break; break;
case SIGHUP: case SIGHUP:
#if defined(SI_KERNEL)
if (!abort_loop && origin != SI_KERNEL) if (!abort_loop && origin != SI_KERNEL)
#elif defined(SI_USER)
if (!abort_loop && origin <= SI_USER)
#else
if (!abort_loop)
#endif
{ {
int not_used; int not_used;
mysql_print_status(); // Print some debug info mysql_print_status(); // Print some debug info
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment