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

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
Index: base/linux_util.cc
===================================================================
--- base/linux_util.cc (revision 88621)
+++ base/linux_util.cc (working copy)
@@ -252,7 +252,8 @@
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);
DIR* task = opendir(buf);
@@ -273,6 +274,7 @@
closedir(task);
scoped_array<char> syscall_data(new char[expected_data.length()]);
+ *syscall_supported = false;
for (std::vector<pid_t>::const_iterator
i = tids.begin(); i != tids.end(); ++i) {
const pid_t current_tid = *i;
@@ -280,6 +282,7 @@
int fd = open(buf, O_RDONLY);
if (fd < 0)
continue;
+ *syscall_supported = true;
bool read_ret =
file_util::ReadFromFD(fd, syscall_data.get(), expected_data.length());
close(fd);

Powered by Google App Engine
This is Rietveld 408576698