Index: trunk/src/base/linux_util.h |
=================================================================== |
--- trunk/src/base/linux_util.h (revision 270276) |
+++ trunk/src/base/linux_util.h (working copy) |
@@ -24,6 +24,13 @@ |
// Set the Linux Distro string. |
BASE_EXPORT void SetLinuxDistro(const std::string& distro); |
+// Return the inode number for the UNIX domain socket |fd|. |
+BASE_EXPORT bool FileDescriptorGetInode(ino_t* inode_out, int fd); |
+ |
+// Find the process which holds the given socket, named by inode number. If |
+// multiple processes hold the socket, this function returns false. |
+BASE_EXPORT bool FindProcessHoldingSocket(pid_t* pid_out, ino_t socket_inode); |
+ |
// For a given process |pid|, look through all its threads and find the first |
// thread with /proc/[pid]/task/[thread_id]/syscall whose first N bytes matches |
// |expected_data|, where N is the length of |expected_data|. |