diff options
author | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2010-07-01 12:02:00 +0400 |
---|---|---|
committer | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2010-07-01 12:02:00 +0400 |
commit | f3ccf5061fdf7110be6e6f1dd98fe696842081d1 (patch) | |
tree | efbce8aad056787a82089f5e73940248c0a2c3a0 /sql | |
parent | b36a02822430ce90285f067f8e6e8d87859732aa (diff) | |
download | mariadb-git-f3ccf5061fdf7110be6e6f1dd98fe696842081d1.tar.gz |
Bug#54667: Unnecessary signal handler redefinition
POSIX requires that a signal handler defined with sigaction()
is not reset on delivering a signal unless SA_NODEFER or
SA_RESETHAND is set. It is therefore unnecessary to redefine
the handler on signal delivery on platforms where sigaction()
is used without those flags.
include/my_alarm.h:
Renamed DONT_REMEMBER_SIGNAL ->
SIGNAL_HANDLER_RESET_ON_DELIVERY.
include/my_global.h:
Renamed DONT_REMEMBER_SIGNAL ->
SIGNAL_HANDLER_RESET_ON_DELIVERY. The latter is now defined
only on non-BSD platforms missing the POSIX sigaction()
function.
libmysql/libmysql.c:
Renamed DONT_REMEMBER_SIGNAL ->
SIGNAL_HANDLER_RESET_ON_DELIVERY
mysys/thr_alarm.c:
Renamed DONT_REMEMBER_SIGNAL ->
SIGNAL_HANDLER_RESET_ON_DELIVERY
sql/mysqld.cc:
Renamed DONT_REMEMBER_SIGNAL ->
SIGNAL_HANDLER_RESET_ON_DELIVERY
Diffstat (limited to 'sql')
-rw-r--r-- | sql/mysqld.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index daa1bbe8ccc..cac17889638 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1232,7 +1232,7 @@ extern "C" sig_handler print_signal_warning(int sig) { if (global_system_variables.log_warnings) sql_print_warning("Got signal %d from thread %ld", sig,my_thread_id()); -#ifdef DONT_REMEMBER_SIGNAL +#ifdef SIGNAL_HANDLER_RESET_ON_DELIVERY my_sigset(sig,print_signal_warning); /* int. thread system calls */ #endif #if !defined(__WIN__) && !defined(__NETWARE__) |