Searched refs:proc_fd (Results 1 - 12 of 12) sorted by relevance

/external/libchrome/sandbox/linux/services/
H A Dthread_helpers.h17 // Checks whether the current process is single threaded. |proc_fd|
20 static bool IsSingleThreaded(int proc_fd);
27 static void AssertSingleThreaded(int proc_fd);
32 static bool StartThreadAndWatchProcFS(int proc_fd, base::Thread* thread);
37 static bool StopThreadAndWatchProcFS(int proc_fd, base::Thread* thread);
H A Dproc_util_unittest.cc17 base::ScopedFD proc_fd(open("/proc/", O_RDONLY | O_DIRECTORY));
18 ASSERT_TRUE(proc_fd.is_valid());
19 int fd_count = ProcUtil::CountOpenFds(proc_fd.get());
22 EXPECT_EQ(fd_count + 1, ProcUtil::CountOpenFds(proc_fd.get()));
24 EXPECT_EQ(fd_count, ProcUtil::CountOpenFds(proc_fd.get()));
32 int proc_fd = open("/proc/", O_RDONLY | O_DIRECTORY); local
33 base::ScopedFD proc_fd_closer(proc_fd);
40 int proc_fd = open("/proc/", O_RDONLY | O_DIRECTORY); local
41 base::ScopedFD proc_fd_closer(proc_fd);
42 ASSERT_LE(0, proc_fd);
[all...]
H A Dthread_helpers_unittests.cc58 ScopedProc proc_fd; local
59 ASSERT_TRUE(ThreadHelpers::IsSingleThreaded(proc_fd.fd()));
63 ASSERT_TRUE(ThreadHelpers::StartThreadAndWatchProcFS(proc_fd.fd(), &thread));
64 ASSERT_FALSE(ThreadHelpers::IsSingleThreaded(proc_fd.fd()));
67 ASSERT_TRUE(ThreadHelpers::StopThreadAndWatchProcFS(proc_fd.fd(), &thread));
71 ScopedProc proc_fd; local
72 SANDBOX_ASSERT(ThreadHelpers::IsSingleThreaded(proc_fd.fd()));
75 ThreadHelpers::AssertSingleThreaded(proc_fd.fd());
80 ScopedProc proc_fd; local
81 ASSERT_TRUE(ThreadHelpers::IsSingleThreaded(proc_fd
95 ScopedProc proc_fd; local
113 ScopedProc proc_fd; local
[all...]
H A Dthread_helpers.cc37 bool IsSingleThreadedImpl(int proc_fd) { argument
38 CHECK_LE(0, proc_fd);
40 int fstat_ret = fstatat(proc_fd, "self/task/", &task_stat, 0);
51 bool IsThreadPresentInProcFS(int proc_fd, argument
55 fstatat(proc_fd, thread_id_dir_str.c_str(), &task_stat, 0);
63 bool IsNotThreadPresentInProcFS(int proc_fd, argument
65 return !IsThreadPresentInProcFS(proc_fd, thread_id_dir_str);
108 bool IsMultiThreaded(int proc_fd) { argument
109 return !ThreadHelpers::IsSingleThreaded(proc_fd);
115 int proc_fd, bas
114 ChangeThreadStateAndWatchProcFS( int proc_fd, base::Thread* thread, ThreadAction action) argument
160 IsSingleThreaded(int proc_fd) argument
172 AssertSingleThreaded(int proc_fd) argument
184 StartThreadAndWatchProcFS(int proc_fd, base::Thread* thread) argument
190 StopThreadAndWatchProcFS(int proc_fd, base::Thread* thread) argument
[all...]
H A Dproc_util.h17 // table, excluding |proc_fd|, which should be a file descriptor for
19 static int CountOpenFds(int proc_fd);
26 // has been dropped. In this case, |proc_fd| should be a file descriptor to
27 // /proc/. The file descriptor in |proc_fd| will be ignored by
30 static bool HasOpenDirectory(int proc_fd) WARN_UNUSED_RESULT;
H A Dcredentials.h41 // |proc_fd| must be a file descriptor to /proc/ and remains owned by
43 static bool DropAllCapabilities(int proc_fd) WARN_UNUSED_RESULT;
48 static bool SetCapabilities(int proc_fd,
89 // |proc_fd| must be a file descriptor to /proc/ and must be the only open
93 // - the caller must close |proc_fd| eventually or access to the file
96 static bool DropFileSystemAccess(int proc_fd) WARN_UNUSED_RESULT;
H A Dproc_util.cc41 int ProcUtil::CountOpenFds(int proc_fd) { argument
42 DCHECK_LE(0, proc_fd);
44 openat(proc_fd, "self/fd/", O_DIRECTORY | O_RDONLY | O_CLOEXEC));
62 if (fd_num == proc_fd || fd_num == proc_self_fd) {
71 bool ProcUtil::HasOpenDirectory(int proc_fd) { argument
72 DCHECK_LE(0, proc_fd);
74 openat(proc_fd, "self/fd/", O_DIRECTORY | O_RDONLY | O_CLOEXEC);
92 if (fd_num == proc_fd || fd_num == proc_self_fd) {
109 base::ScopedFD proc_fd(
111 return HasOpenDirectory(proc_fd
[all...]
H A Dcredentials_unittest.cc163 base::ScopedFD proc_fd(ProcUtil::OpenProc());
164 CHECK(Credentials::DropAllCapabilities(proc_fd.get()));
167 CHECK(Credentials::DropFileSystemAccess(proc_fd.get()));
168 CHECK(Credentials::DropAllCapabilities(proc_fd.get()));
181 base::ScopedFD proc_fd(ProcUtil::OpenProc());
188 CHECK(Credentials::SetCapabilities(proc_fd.get(), caps));
194 CHECK(Credentials::SetCapabilities(proc_fd.get(), no_caps));
203 base::ScopedFD proc_fd(ProcUtil::OpenProc());
210 CHECK(Credentials::SetCapabilities(proc_fd.get(), caps));
222 base::ScopedFD proc_fd(ProcUti
[all...]
H A Dcredentials.cc156 bool Credentials::DropAllCapabilities(int proc_fd) { argument
157 if (!SetCapabilities(proc_fd, std::vector<Capability>())) {
167 base::ScopedFD proc_fd(ProcUtil::OpenProc());
168 return Credentials::DropAllCapabilities(proc_fd.get());
197 bool Credentials::SetCapabilities(int proc_fd, argument
199 DCHECK_LE(0, proc_fd);
204 CHECK(ThreadHelpers::IsSingleThreaded(proc_fd));
314 bool Credentials::DropFileSystemAccess(int proc_fd) { argument
315 CHECK_LE(0, proc_fd);
319 CHECK(!ProcUtil::HasOpenDirectory(proc_fd));
[all...]
/external/v8/src/base/platform/
H A Dplatform-qnx.cc122 int proc_fd, num, i; local
132 if ((proc_fd = open(buf, O_RDONLY)) == -1) {
133 close(proc_fd);
138 if (devctl(proc_fd, DCMD_PROC_MAPINFO, NULL, 0, &num) != EOK) {
139 close(proc_fd);
146 close(proc_fd);
151 if (devctl(proc_fd, DCMD_PROC_PAGEDATA,
154 close(proc_fd);
162 if (devctl(proc_fd, DCMD_PROC_MAPDEBUG, &map, sizeof(map), 0) != EOK) {
170 close(proc_fd);
[all...]
/external/libchrome/sandbox/linux/seccomp-bpf/
H A Dsandbox_bpf.cc42 bool IsSingleThreaded(int proc_fd) { argument
43 return ThreadHelpers::IsSingleThreaded(proc_fd);
198 void SandboxBPF::SetProcFd(base::ScopedFD proc_fd) { argument
199 proc_fd_.swap(proc_fd);
H A Dsandbox_bpf.h74 void SetProcFd(base::ScopedFD proc_fd);

Completed in 116 milliseconds