Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
01de316f
Commit
01de316f
authored
May 26, 2003
by
monty@narttu.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed problem with 'kill pid-of-mysqld' on Mac OS X
parent
cf99d899
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
sql/mysqld.cc
sql/mysqld.cc
+11
-4
No files found.
sql/mysqld.cc
View file @
01de316f
...
@@ -1346,6 +1346,7 @@ information that should help you find out what is causing the crash\n");
...
@@ -1346,6 +1346,7 @@ information that should help you find out what is causing the crash\n");
static
void
init_signals
(
void
)
static
void
init_signals
(
void
)
{
{
sigset_t
set
;
sigset_t
set
;
struct
sigaction
sa
;
DBUG_ENTER
(
"init_signals"
);
DBUG_ENTER
(
"init_signals"
);
sigset
(
THR_KILL_SIGNAL
,
end_thread_signal
);
sigset
(
THR_KILL_SIGNAL
,
end_thread_signal
);
...
@@ -1353,7 +1354,6 @@ static void init_signals(void)
...
@@ -1353,7 +1354,6 @@ static void init_signals(void)
if
(
!
(
test_flags
&
TEST_NO_STACKTRACE
)
||
(
test_flags
&
TEST_CORE_ON_SIGNAL
))
if
(
!
(
test_flags
&
TEST_NO_STACKTRACE
)
||
(
test_flags
&
TEST_CORE_ON_SIGNAL
))
{
{
struct
sigaction
sa
;
sa
.
sa_flags
=
SA_RESETHAND
|
SA_NODEFER
;
sa
.
sa_flags
=
SA_RESETHAND
|
SA_NODEFER
;
sigemptyset
(
&
sa
.
sa_mask
);
sigemptyset
(
&
sa
.
sa_mask
);
sigprocmask
(
SIG_SETMASK
,
&
sa
.
sa_mask
,
NULL
);
sigprocmask
(
SIG_SETMASK
,
&
sa
.
sa_mask
,
NULL
);
...
@@ -1378,15 +1378,22 @@ static void init_signals(void)
...
@@ -1378,15 +1378,22 @@ static void init_signals(void)
sigaddset
(
&
set
,
SIGQUIT
);
sigaddset
(
&
set
,
SIGQUIT
);
sigaddset
(
&
set
,
SIGTERM
);
sigaddset
(
&
set
,
SIGTERM
);
sigaddset
(
&
set
,
SIGHUP
);
sigaddset
(
&
set
,
SIGHUP
);
sigset
(
SIGTERM
,
print_signal_warning
);
// If it's blocked by parent
signal
(
SIGHUP
,
print_signal_warning
);
// If it's blocked by parent
/* Fix signals if blocked by parents (can happen on Mac OS X) */
sa
.
sa_flags
=
0
;
sa
.
sa_handler
=
print_signal_warning
;
sigaction
(
SIGTERM
,
&
sa
,
(
struct
sigaction
*
)
0
);
sa
.
sa_flags
=
0
;
sa
.
sa_handler
=
print_signal_warning
;
sigaction
(
SIGHUP
,
&
sa
,
(
struct
sigaction
*
)
0
);
#ifdef SIGTSTP
#ifdef SIGTSTP
sigaddset
(
&
set
,
SIGTSTP
);
sigaddset
(
&
set
,
SIGTSTP
);
#endif
#endif
sigaddset
(
&
set
,
THR_SERVER_ALARM
);
sigaddset
(
&
set
,
THR_SERVER_ALARM
);
sigdelset
(
&
set
,
THR_KILL_SIGNAL
);
// May be SIGINT
sigdelset
(
&
set
,
THR_KILL_SIGNAL
);
// May be SIGINT
sigdelset
(
&
set
,
THR_CLIENT_ALARM
);
// For alarms
sigdelset
(
&
set
,
THR_CLIENT_ALARM
);
// For alarms
(
void
)
pthread_sigmask
(
SIG_SETMASK
,
&
set
,
NULL
);
sigprocmask
(
SIG_SETMASK
,
&
set
,
NULL
);
pthread_sigmask
(
SIG_SETMASK
,
&
set
,
NULL
);
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment