summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@bitch.mysql.fi>2001-11-21 15:08:01 +0200
committerunknown <monty@bitch.mysql.fi>2001-11-21 15:08:01 +0200
commit0afe57ba58fdfdc8a11a7d1d516a18753f35a37b (patch)
treea55b3a386f103ad3f7f2fa4c9339ff3634ac2436 /sql
parentb2cec26dfb0fa6e2e7240d5dd2044e1192596ef8 (diff)
downloadmariadb-git-0afe57ba58fdfdc8a11a7d1d516a18753f35a37b.tar.gz
Generate core file on Solaris.
Docs/manual.texi: ChangeLog sql/mysqld.cc: Cleanup BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'sql')
-rw-r--r--sql/mysqld.cc35
-rw-r--r--sql/stacktrace.c2
2 files changed, 21 insertions, 16 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index bfbe8f8a25a..7303d593bdc 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1119,6 +1119,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
@@ -1135,22 +1148,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
@@ -1160,10 +1161,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);
diff --git a/sql/stacktrace.c b/sql/stacktrace.c
index 81d8debc27a..18db1949db9 100644
--- a/sql/stacktrace.c
+++ b/sql/stacktrace.c
@@ -218,5 +218,7 @@ void write_core(int sig)
{
signal(sig, SIG_DFL);
pthread_kill(pthread_self(), sig);
+ /* On Solaris, the above kill is not enough */
+ sigsend(P_PID,P_MYID,sig);
}
#endif