summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2004-08-13 15:29:47 +0200
committerunknown <guilhem@mysql.com>2004-08-13 15:29:47 +0200
commit621506815f343abc29ab1b8a89adc757f6e32bf9 (patch)
tree582f7a96c0de7a73605ef6c6e4f858a80e79d75b
parent4dfe16c287bc06cf994099382d0465d518370301 (diff)
downloadmariadb-git-621506815f343abc29ab1b8a89adc757f6e32bf9.tar.gz
Escaping [] so that darwin[7-8] gets into 'configure' and not darwin7-8
Adding a compilation define so that on recent Darwin mysqld does not react to SIGHUP and SIGQUIT: this fixes a rpl000001 problem on our Powermac G5 machine (popping after an upgrade from 10.3.4 to 10.3.5) and is expected to fix BUG#2030 "relay bin log on slave resets multiple times a second" (i.e. under some Mac OS X Panther versions, mysqld receives many SIGHUP and SIGQUIT). So this fix is more a problem-hider than a real understanding of why mysqld receives so many signals. Note that we saw other problems on this OS where mysqld reacts to Ctrl-Z but apparently only once, where using SSL seems to make the problem more frequent... configure.in: Escaping [] so that darwin[7-8] gets into 'configure' and not darwin7-8 Adding a compilation define so that on recent Darwin mysqld does not react to SIGHUP and SIGQUIT. sql/mysqld.cc: optionally ignore SIGHUP and SIGQUIT, for some Mac OS X Panther versions which send too many of those.
-rw-r--r--configure.in5
-rw-r--r--sql/mysqld.cc8
2 files changed, 9 insertions, 4 deletions
diff --git a/configure.in b/configure.in
index be3269d50d6..a3be0966a17 100644
--- a/configure.in
+++ b/configure.in
@@ -1047,10 +1047,11 @@ case $SYSTEM_TYPE in
MAX_C_OPTIMIZE="-O"
fi
;;
- *darwin[7-8]*)
+ *darwin[[7-8]]*)
+ # don't forget to escape [] like above
if test "$ac_cv_prog_gcc" = "yes"
then
- FLAGS="-DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ"
+ FLAGS="-DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT"
CFLAGS="$CFLAGS $FLAGS"
CXXFLAGS="$CXXFLAGS $FLAGS"
MAX_C_OPTIMIZE="-O"
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 3f7c187ccdd..8f08099f340 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1836,9 +1836,11 @@ static void init_signals(void)
sigaddset(&set,SIGPIPE);
#endif
sigaddset(&set,SIGINT);
+#ifndef IGNORE_SIGHUP_SIGQUIT
sigaddset(&set,SIGQUIT);
- sigaddset(&set,SIGTERM);
sigaddset(&set,SIGHUP);
+#endif
+ sigaddset(&set,SIGTERM);
/* Fix signals if blocked by parents (can happen on Mac OS X) */
sigemptyset(&sa.sa_mask);
@@ -1921,11 +1923,13 @@ extern "C" void *signal_hand(void *arg __attribute__((unused)))
#ifdef USE_ONE_SIGNAL_HAND
(void) sigaddset(&set,THR_SERVER_ALARM); // For alarms
#endif
+#ifndef IGNORE_SIGHUP_SIGQUIT
(void) sigaddset(&set,SIGQUIT);
- (void) sigaddset(&set,SIGTERM);
#if THR_CLIENT_ALARM != SIGHUP
(void) sigaddset(&set,SIGHUP);
#endif
+#endif
+ (void) sigaddset(&set,SIGTERM);
(void) sigaddset(&set,SIGTSTP);
/* Save pid to this process (or thread on Linux) */