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

Side by Side Diff: base/linux_util.h

Issue 2961008: Linux: Guess the thread id for crashing renderers in a different PID namespac... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/linux_util.cc » ('j') | base/linux_util.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_LINUX_UTIL_H_ 5 #ifndef BASE_LINUX_UTIL_H_
6 #define BASE_LINUX_UTIL_H_ 6 #define BASE_LINUX_UTIL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 10
(...skipping 11 matching lines...) Expand all
22 // GetWinVersion() in base/win_util.h. 22 // GetWinVersion() in base/win_util.h.
23 std::string GetLinuxDistro(); 23 std::string GetLinuxDistro();
24 24
25 // Return the inode number for the UNIX domain socket |fd|. 25 // Return the inode number for the UNIX domain socket |fd|.
26 bool FileDescriptorGetInode(ino_t* inode_out, int fd); 26 bool FileDescriptorGetInode(ino_t* inode_out, int fd);
27 27
28 // Find the process which holds the given socket, named by inode number. If 28 // Find the process which holds the given socket, named by inode number. If
29 // multiple processes hold the socket, this function returns false. 29 // multiple processes hold the socket, this function returns false.
30 bool FindProcessHoldingSocket(pid_t* pid_out, ino_t socket_inode); 30 bool FindProcessHoldingSocket(pid_t* pid_out, ino_t socket_inode);
31 31
32 // For a given process |pid|, look through all its threads and find the first
33 // thread with /proc/[pid]/task/[thread_id]/syscall whose first N bytes matches
34 // |expected_data|, where N is the length of |expected_data|.
35 // Returns the thread id or -1 on error.
36 pid_t FindThreadIDWithSyscall(pid_t pid, const std::string& expected_data);
37
32 } // namespace base 38 } // namespace base
33 39
34 #endif // BASE_LINUX_UTIL_H_ 40 #endif // BASE_LINUX_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/linux_util.cc » ('j') | base/linux_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698