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

Unified Diff: base/linux_util.cc

Issue 7190019: Always search TIDs for the crashing processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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 | « base/linux_util.h ('k') | chrome/browser/crash_handler_host_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/linux_util.cc
===================================================================
--- base/linux_util.cc (revision 88621)
+++ base/linux_util.cc (working copy)
@@ -252,9 +252,14 @@
return already_found;
}
-pid_t FindThreadIDWithSyscall(pid_t pid, const std::string& expected_data) {
+pid_t FindThreadIDWithSyscall(pid_t pid, const std::string& expected_data,
+ bool* syscall_supported) {
char buf[256];
snprintf(buf, sizeof(buf), "/proc/%d/task", pid);
+
+ if (syscall_supported != NULL)
+ *syscall_supported = false;
+
DIR* task = opendir(buf);
if (!task) {
LOG(WARNING) << "Cannot open " << buf;
@@ -280,6 +285,8 @@
int fd = open(buf, O_RDONLY);
if (fd < 0)
continue;
+ if (syscall_supported != NULL)
+ *syscall_supported = true;
bool read_ret =
file_util::ReadFromFD(fd, syscall_data.get(), expected_data.length());
close(fd);
« no previous file with comments | « base/linux_util.h ('k') | chrome/browser/crash_handler_host_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698