summaryrefslogtreecommitdiff
path: root/libmysql
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
commitac89d92625a0ebf7ba70de0412b38e5cefdf2dda (patch)
treeefbce8aad056787a82089f5e73940248c0a2c3a0 /libmysql
parentf48306344ac2a17f19222d30ba8fc23b146bdf12 (diff)
downloadmariadb-git-ac89d92625a0ebf7ba70de0412b38e5cefdf2dda.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.
Diffstat (limited to 'libmysql')
-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
}