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
e3277708
Commit
e3277708
authored
Jul 05, 2013
by
Yoni Fogel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refs Tokutek/ft-index#28 Fix compile failure on machines without prctl
parent
7148e0b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
cmake_modules/TokuFeatureDetection.cmake
cmake_modules/TokuFeatureDetection.cmake
+1
-0
portability/toku_crash.cc
portability/toku_crash.cc
+5
-2
No files found.
cmake_modules/TokuFeatureDetection.cmake
View file @
e3277708
...
@@ -39,6 +39,7 @@ check_include_files(syscall.h HAVE_SYSCALL_H)
...
@@ -39,6 +39,7 @@ check_include_files(syscall.h HAVE_SYSCALL_H)
check_include_files
(
sys/endian.h HAVE_SYS_ENDIAN_H
)
check_include_files
(
sys/endian.h HAVE_SYS_ENDIAN_H
)
check_include_files
(
sys/file.h HAVE_SYS_FILE_H
)
check_include_files
(
sys/file.h HAVE_SYS_FILE_H
)
check_include_files
(
sys/malloc.h HAVE_SYS_MALLOC_H
)
check_include_files
(
sys/malloc.h HAVE_SYS_MALLOC_H
)
check_include_files
(
sys/prctl.h HAVE_SYS_PRCTL_H
)
check_include_files
(
sys/resource.h HAVE_SYS_RESOURCE_H
)
check_include_files
(
sys/resource.h HAVE_SYS_RESOURCE_H
)
check_include_files
(
sys/statvfs.h HAVE_SYS_STATVFS_H
)
check_include_files
(
sys/statvfs.h HAVE_SYS_STATVFS_H
)
check_include_files
(
sys/syscall.h HAVE_SYS_SYSCALL_H
)
check_include_files
(
sys/syscall.h HAVE_SYS_SYSCALL_H
)
...
...
portability/toku_crash.cc
View file @
e3277708
...
@@ -88,9 +88,10 @@ PATENT RIGHTS GRANT:
...
@@ -88,9 +88,10 @@ PATENT RIGHTS GRANT:
#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#ident "Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."
#include <unistd.h>
#include <unistd.h>
#ifdef HAVE_SYS_PRCTL_H
#include <sys/prctl.h>
#include <sys/prctl.h>
#endif
//#include <sys/types.h>
#include <sys/wait.h>
#include <sys/wait.h>
#include <toku_race_tools.h>
#include <toku_race_tools.h>
#include "toku_crash.h"
#include "toku_crash.h"
...
@@ -126,7 +127,9 @@ run_gdb(pid_t parent_pid, const char *gdb_path) {
...
@@ -126,7 +127,9 @@ run_gdb(pid_t parent_pid, const char *gdb_path) {
static
void
static
void
intermediate_process
(
pid_t
parent_pid
,
const
char
*
gdb_path
)
{
intermediate_process
(
pid_t
parent_pid
,
const
char
*
gdb_path
)
{
// Disable generating of core dumps
// Disable generating of core dumps
#if defined(HAVE_SYS_PRCTL_H) && defined(HAVE_PR_SET_PTRACER)
prctl
(
PR_SET_DUMPABLE
,
0
,
0
,
0
);
prctl
(
PR_SET_DUMPABLE
,
0
,
0
,
0
);
#endif
pid_t
worker_pid
=
fork
();
pid_t
worker_pid
=
fork
();
if
(
worker_pid
<
0
)
{
if
(
worker_pid
<
0
)
{
perror
(
"spawn gdb fork: "
);
perror
(
"spawn gdb fork: "
);
...
@@ -177,7 +180,7 @@ failure:
...
@@ -177,7 +180,7 @@ failure:
static
void
static
void
spawn_gdb
(
const
char
*
gdb_path
)
{
spawn_gdb
(
const
char
*
gdb_path
)
{
pid_t
parent_pid
=
getpid
();
pid_t
parent_pid
=
getpid
();
#if defined(HAVE_PR_SET_PTRACER)
#if defined(HAVE_
SYS_PRCTL_H) && defined(HAVE_
PR_SET_PTRACER)
// On systems that require permission for the same user to ptrace,
// On systems that require permission for the same user to ptrace,
// give permission for this process and (more importantly) all its children to debug this process.
// give permission for this process and (more importantly) all its children to debug this process.
prctl
(
PR_SET_PTRACER
,
parent_pid
,
0
,
0
,
0
);
prctl
(
PR_SET_PTRACER
,
parent_pid
,
0
,
0
,
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