@@ -2104,11 +2104,10 @@ static void wait_for_signal_thread_to_end()
2104
2104
if (err && err != ESRCH)
2105
2105
{
2106
2106
sql_print_error (" Failed to send kill signal to signal handler thread, "
2107
- " pthread_kill() errno: %d" ,
2108
- err);
2107
+ " pthread_kill() errno: %d" , err);
2109
2108
}
2110
2109
2111
- if (i == n_waits && signal_thread_in_use)
2110
+ if (i == n_waits && signal_thread_in_use && !opt_bootstrap )
2112
2111
{
2113
2112
sql_print_warning (" Signal handler thread did not exit in a timely manner. "
2114
2113
" Continuing to wait for it to stop.." );
@@ -2895,10 +2894,8 @@ void init_signals(void)
2895
2894
(void ) sigemptyset (&set);
2896
2895
my_sigset (SIGPIPE,SIG_IGN);
2897
2896
sigaddset (&set,SIGPIPE);
2898
- #ifndef IGNORE_SIGHUP_SIGQUIT
2899
2897
sigaddset (&set,SIGQUIT);
2900
2898
sigaddset (&set,SIGHUP);
2901
- #endif
2902
2899
sigaddset (&set,SIGTERM);
2903
2900
2904
2901
/* Fix signals if blocked by parents (can happen on Mac OS X) */
@@ -2980,20 +2977,20 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused)))
2980
2977
(void ) sigaddset (&set,SIGINT);
2981
2978
(void ) pthread_sigmask (SIG_UNBLOCK,&set,NULL );
2982
2979
}
2983
- (void ) sigemptyset (&set); // Setup up SIGINT for debug
2980
+ (void ) sigemptyset (&set);
2984
2981
#ifdef USE_ONE_SIGNAL_HAND
2985
2982
(void ) sigaddset (&set,THR_SERVER_ALARM); // For alarms
2986
2983
#endif
2987
- #ifndef IGNORE_SIGHUP_SIGQUIT
2988
2984
(void ) sigaddset (&set,SIGQUIT);
2989
- (void ) sigaddset (&set,SIGHUP);
2990
- #endif
2991
2985
(void ) sigaddset (&set,SIGTERM);
2992
2986
(void ) sigaddset (&set,SIGTSTP);
2993
2987
2994
2988
/* Save pid to this process (or thread on Linux) */
2995
2989
if (!opt_bootstrap)
2990
+ {
2991
+ (void ) sigaddset (&set,SIGHUP);
2996
2992
create_pid_file ();
2993
+ }
2997
2994
2998
2995
/*
2999
2996
signal to start_signal_handler that we are ready
0 commit comments