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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
99945d77
Commit
99945d77
authored
Mar 30, 2021
by
David CARLIER
Committed by
Robert Bindar
Mar 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-25294 signal handler display coredump on mac
parent
b771ab24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
sql/signal_handler.cc
sql/signal_handler.cc
+13
-1
No files found.
sql/signal_handler.cc
View file @
99945d77
...
@@ -30,6 +30,11 @@
...
@@ -30,6 +30,11 @@
#define SIGNAL_FMT "signal %d"
#define SIGNAL_FMT "signal %d"
#endif
#endif
#ifdef __APPLE__
#include <sys/sysctl.h>
#endif
#ifndef PATH_MAX
#ifndef PATH_MAX
#define PATH_MAX 4096
#define PATH_MAX 4096
#endif
#endif
...
@@ -51,7 +56,7 @@ extern const char *optimizer_switch_names[];
...
@@ -51,7 +56,7 @@ extern const char *optimizer_switch_names[];
static
inline
void
output_core_info
()
static
inline
void
output_core_info
()
{
{
/* proc is optional on some BSDs so it can't hurt to look */
/* proc is optional on some BSDs so it can't hurt to look */
#if
def HAVE_READLINK
#if
defined(HAVE_READLINK) && !defined(__APPLE__)
char
buff
[
PATH_MAX
];
char
buff
[
PATH_MAX
];
ssize_t
len
;
ssize_t
len
;
int
fd
;
int
fd
;
...
@@ -77,6 +82,13 @@ static inline void output_core_info()
...
@@ -77,6 +82,13 @@ static inline void output_core_info()
my_close
(
fd
,
MYF
(
0
));
my_close
(
fd
,
MYF
(
0
));
}
}
#endif
#endif
#elif defined(__APPLE__)
char
buff
[
PATH_MAX
];
size_t
len
=
sizeof
(
buff
);
if
(
sysctlbyname
(
"kern.corefile"
,
buff
,
&
len
,
NULL
,
0
)
==
0
)
{
my_safe_printf_stderr
(
"Core pattern: %.*s
\n
"
,
(
int
)
len
,
buff
);
}
#else
#else
char
buff
[
80
];
char
buff
[
80
];
my_getwd
(
buff
,
sizeof
(
buff
),
0
);
my_getwd
(
buff
,
sizeof
(
buff
),
0
);
...
...
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