Allow Linux dumper to work on PTRACE-hardened kernels

A=Chris Coulson <chris.coulson@canonical.com>
R=nealsid at http://breakpad.appspot.com/166001/show

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@673 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
ted.mielczarek
2010-08-27 13:18:49 +00:00
parent 8e77c078d6
commit 662b6da59d
2 changed files with 69 additions and 0 deletions

View File

@@ -184,6 +184,8 @@ class ExceptionHandler {
void UninstallHandlers();
void PreresolveSymbols();
bool GenerateDump(CrashContext *context);
void SendContinueSignalToChild();
void WaitForContinueSignal();
void UpdateNextID();
static void SignalHandler(int sig, siginfo_t* info, void* uc);
@@ -223,6 +225,13 @@ class ExceptionHandler {
// A vector of the old signal handlers.
std::vector<std::pair<int, struct sigaction *> > old_handlers_;
// We need to explicitly enable ptrace of parent processes on some
// kernels, but we need to know the PID of the cloned process before we
// can do this. We create a pipe which we can use to block the
// cloned process after creating it, until we have explicitly enabled
// ptrace. This is used to store the file descriptors for the pipe
int fdes[2];
};
} // namespace google_breakpad