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 | e5a6661ac956db5b468f04ce99965e9dba0d1c29 (patch) | |
tree | efbce8aad056787a82089f5e73940248c0a2c3a0 /libmysql/libmysql.c | |
parent | 15a252f6cf8726780da60b2dc3835b2f040b9327 (diff) | |
download | mariadb-git-e5a6661ac956db5b468f04ce99965e9dba0d1c29.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 'libmysql/libmysql.c')
-rw-r--r-- | libmysql/libmysql.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 6ea777a0702..cfbeb99508f 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -328,7 +328,7 @@ sig_handler my_pipe_sig_handler(int sig __attribute__((unused))) { DBUG_PRINT("info",("Hit by signal %d",sig)); -#ifdef DONT_REMEMBER_SIGNAL +#ifdef SIGNAL_HANDLER_RESET_ON_DELIVERY (void) signal(SIGPIPE, my_pipe_sig_handler); #endif } |