summaryrefslogtreecommitdiff
path: root/sql/mysqld.cc
diff options
context:
space:
mode:
authormonty@bitch.mysql.fi <>2001-11-21 15:24:02 +0200
committermonty@bitch.mysql.fi <>2001-11-21 15:24:02 +0200
commitd33c13e4fed5264fbd481e8b95e488ffc6abebfc (patch)
tree3672cd1316cec42d33f2bb5de7e1c81412ac06e8 /sql/mysqld.cc
parent365bd6eb6ef24b7a927651111fb724166ba77062 (diff)
parent9cb670df71eb33a9be752eeea8b9454119652dcf (diff)
downloadmariadb-git-d33c13e4fed5264fbd481e8b95e488ffc6abebfc.tar.gz
Merge
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r--sql/mysqld.cc35
1 files changed, 19 insertions, 16 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 5e6b5c098d7..f56cad86086 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1116,6 +1116,19 @@ static void start_signal_handler(void)
}
#elif defined(__EMX__)
+static void init_signals(void)
+{
+ signal(SIGQUIT, sig_kill);
+ signal(SIGKILL, sig_kill);
+ signal(SIGTERM, sig_kill);
+ signal(SIGINT, sig_kill);
+ signal(SIGHUP, sig_reload); // Flush everything
+ signal(SIGALRM, SIG_IGN);
+ signal(SIGBREAK,SIG_IGN);
+ signal_thread = pthread_self();
+}
+
+
static void sig_reload(int signo)
{
reload_acl_and_cache((THD*) 0,REFRESH_LOG, (TABLE_LIST*) 0); // Flush everything
@@ -1132,22 +1145,10 @@ static void sig_kill(int signo)
signal(signo, SIG_ACK);
}
-static void init_signals(void)
-{
- signal(SIGQUIT, sig_kill);
- signal(SIGKILL, sig_kill);
- signal(SIGTERM, sig_kill);
- signal(SIGINT, sig_kill);
- signal(SIGHUP, sig_reload); // Flush everything
- signal(SIGALRM, SIG_IGN);
- signal(SIGBREAK,SIG_IGN);
- signal_thread = pthread_self();
-}
static void start_signal_handler(void)
{
}
-
#else /* if ! __WIN__ && ! __EMX__ */
#ifdef HAVE_LINUXTHREADS
@@ -1157,10 +1158,12 @@ static void start_signal_handler(void)
static sig_handler handle_segfault(int sig)
{
THD *thd=current_thd;
- // strictly speaking, one needs a mutex here
- // but since we have got SIGSEGV already, things are a mess
- // so not having the mutex is not as bad as possibly using a buggy
- // mutex - so we keep things simple
+ /*
+ Strictly speaking, we should need a mutex here
+ but since we have got SIGSEGV already, things are a mess
+ so not having the mutex is not as bad as possibly using a buggy
+ mutex - so we keep things simple.
+ */
if (segfaulted)
{
fprintf(stderr, "Fatal signal %d while backtracing\n", sig);