mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Bug#54667: Unnecessary signal handler redefinition
POSIX requires that a signal handler defined with sigaction() is not reset on delivering a signal unless SA_NODEFER or SA_RESETHAND is set. It is therefore unnecessary to redefine the handler on signal delivery on platforms where sigaction() is used without those flags. include/my_alarm.h: Renamed DONT_REMEMBER_SIGNAL -> SIGNAL_HANDLER_RESET_ON_DELIVERY. include/my_global.h: Renamed DONT_REMEMBER_SIGNAL -> SIGNAL_HANDLER_RESET_ON_DELIVERY. The latter is now defined only on non-BSD platforms missing the POSIX sigaction() function. libmysql/libmysql.c: Renamed DONT_REMEMBER_SIGNAL -> SIGNAL_HANDLER_RESET_ON_DELIVERY mysys/thr_alarm.c: Renamed DONT_REMEMBER_SIGNAL -> SIGNAL_HANDLER_RESET_ON_DELIVERY sql/mysqld.cc: Renamed DONT_REMEMBER_SIGNAL -> SIGNAL_HANDLER_RESET_ON_DELIVERY
This commit is contained in:
@ -328,7 +328,7 @@ sig_handler
|
||||
my_pipe_sig_handler(int sig __attribute__((unused)))
|
||||
{
|
||||
DBUG_PRINT("info",("Hit by signal %d",sig));
|
||||
#ifdef DONT_REMEMBER_SIGNAL
|
||||
#ifdef SIGNAL_HANDLER_RESET_ON_DELIVERY
|
||||
(void) signal(SIGPIPE, my_pipe_sig_handler);
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user