summaryrefslogtreecommitdiff
path: root/libmysql/libmysql.c
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-07-01 12:02:00 +0400
committerAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-07-01 12:02:00 +0400
commitf3ccf5061fdf7110be6e6f1dd98fe696842081d1 (patch)
treeefbce8aad056787a82089f5e73940248c0a2c3a0 /libmysql/libmysql.c
parentb36a02822430ce90285f067f8e6e8d87859732aa (diff)
downloadmariadb-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 'libmysql/libmysql.c')
-rw-r--r--libmysql/libmysql.c2
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
}