summaryrefslogtreecommitdiffstats
path: root/base/linux_util.h
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-29 04:02:55 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-29 04:02:55 +0000
commit85ebe8f925a09c930a029f8a38fbebca40ace8c3 (patch)
tree935a77de9bbb4c9238ba323c39e80c415f1836aa /base/linux_util.h
parentc5a83288e55153c3ebfdfbb79157ee7804184a4a (diff)
downloadchromium_src-85ebe8f925a09c930a029f8a38fbebca40ace8c3.zip
chromium_src-85ebe8f925a09c930a029f8a38fbebca40ace8c3.tar.gz
chromium_src-85ebe8f925a09c930a029f8a38fbebca40ace8c3.tar.bz2
Move FileDescriptorGetInode() and FindProcessHoldingSocket() into base/linux_util.cc. Reimplement FileDescriptorGetInode().
BUG=none TEST=none Review URL: http://codereview.chromium.org/312002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30433 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/linux_util.h')
-rw-r--r--base/linux_util.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/base/linux_util.h b/base/linux_util.h
index 4cfa9da..aca4804 100644
--- a/base/linux_util.h
+++ b/base/linux_util.h
@@ -53,6 +53,13 @@ const char* GetDesktopEnvironmentName(DesktopEnvironment env);
// Convenience wrapper that calls GetDesktopEnvironment() first.
const char* GetDesktopEnvironmentName(EnvironmentVariableGetter* env);
+// Return the inode number for the UNIX domain socket |fd|.
+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.
+bool FindProcessHoldingSocket(pid_t* pid_out, ino_t socket_inode);
+
} // namespace base
#endif // BASE_LINUX_UTIL_H__