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 /include/my_global.h | |
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 'include/my_global.h')
-rw-r--r-- | include/my_global.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/my_global.h b/include/my_global.h index e284acce186..e13c7c37b62 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -541,8 +541,8 @@ extern "C" int madvise(void *addr, size_t len, int behav); #endif /* Does the system remember a signal handler after a signal ? */ -#ifndef HAVE_BSD_SIGNALS -#define DONT_REMEMBER_SIGNAL +#if !defined(HAVE_BSD_SIGNALS) && !defined(HAVE_SIGACTION) +#define SIGNAL_HANDLER_RESET_ON_DELIVERY #endif /* Define void to stop lint from generating "null effekt" comments */ |