diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2014-10-09 17:25:08 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2014-10-09 17:25:08 -0400 |
commit | 068fb8569f2300e4a5c08413a756417d923ecf5f (patch) | |
tree | ab008f1be51ee322cbeeb5aa73042430a6e63347 /client | |
parent | 59277a7d83374bc293cd58f8be509a81792d829e (diff) | |
parent | dbda20caffbb22115b6f30069b716bc505c49d11 (diff) | |
download | mariadb-git-068fb8569f2300e4a5c08413a756417d923ecf5f.tar.gz |
bzr merge -rtag:mariadb-5.5.40 maria/5.5
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 052f0264511..8e40cf072cd 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -89,7 +89,7 @@ extern "C" { #if defined(__WIN__) #include <conio.h> #else -#include <readline/readline.h> +#include <readline.h> #define HAVE_READLINE #define USE_POPEN #endif @@ -1294,6 +1294,16 @@ int main(int argc,char *argv[]) sig_handler mysql_end(int sig) { +#ifndef _WIN32 + /* + Ingnoring SIGQUIT and SIGINT signals when cleanup process starts. + This will help in resolving the double free issues, which occures in case + the signal handler function is started in between the clean up function. + */ + signal(SIGQUIT, SIG_IGN); + signal(SIGINT, SIG_IGN); +#endif + mysql_close(&mysql); #ifdef HAVE_READLINE if (!status.batch && !quick && !opt_html && !opt_xml && |