Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Unified Diff: user_collector.h

Issue 3755011: crash-reporter: Avoid using system to invoke core2md (Closed) Base URL: http://git.chromium.org/git/crash-reporter.git
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « system_logging_mock.h ('k') | user_collector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: user_collector.h
diff --git a/user_collector.h b/user_collector.h
index 484445fcb8011797584ba98447e84c88eb4a0b91..7d6c7110faff899e60a57a60cb2e797e81fc3a63 100644
--- a/user_collector.h
+++ b/user_collector.h
@@ -6,6 +6,7 @@
#define _CRASH_REPORTER_USER_COLLECTOR_H_
#include <string>
+#include <vector>
#include "crash-reporter/crash_collector.h"
#include "gtest/gtest_prod.h" // for FRIEND_TEST
@@ -51,6 +52,7 @@ class UserCollector : public CrashCollector {
FRIEND_TEST(UserCollectorTest, CopyOffProcFilesBadPath);
FRIEND_TEST(UserCollectorTest, CopyOffProcFilesBadPid);
FRIEND_TEST(UserCollectorTest, CopyOffProcFilesOK);
+ FRIEND_TEST(UserCollectorTest, ForkExecAndPipe);
FRIEND_TEST(UserCollectorTest, GetIdFromStatus);
FRIEND_TEST(UserCollectorTest, GetProcessPath);
FRIEND_TEST(UserCollectorTest, GetSymlinkTarget);
@@ -66,6 +68,8 @@ class UserCollector : public CrashCollector {
kIdMax
};
+ static const int kForkProblem = 255;
+
std::string GetPattern(bool enabled) const;
bool SetUpInternal(bool enabled);
@@ -86,6 +90,8 @@ class UserCollector : public CrashCollector {
bool GetCreatedCrashDirectory(pid_t pid,
FilePath *crash_file_path);
bool CopyStdinToCoreFile(const FilePath &core_path);
+ int ForkExecAndPipe(std::vector<const char *> &arguments,
+ const char *output_file);
bool ConvertCoreToMinidump(const FilePath &core_path,
const FilePath &procfs_directory,
const FilePath &minidump_path,
« no previous file with comments | « system_logging_mock.h ('k') | user_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698