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

Unified Diff: sandbox/linux/services/thread_helpers.cc

Issue 733303004: Linux sandbox: change API to start the sandbox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits from Jorge. Created 6 years, 1 month 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
« no previous file with comments | « sandbox/linux/seccomp-bpf/sandbox_bpf_test_runner.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/services/thread_helpers.cc
diff --git a/sandbox/linux/services/thread_helpers.cc b/sandbox/linux/services/thread_helpers.cc
index e820449cb703607862da639f604b7134c22b79d8..dbadbd44e7011593174770856ad89a700c95bcb2 100644
--- a/sandbox/linux/services/thread_helpers.cc
+++ b/sandbox/linux/services/thread_helpers.cc
@@ -43,7 +43,8 @@ bool IsSingleThreadedImpl(int proc_self_task) {
bool ThreadHelpers::IsSingleThreaded(int proc_self_task) {
DCHECK_LE(-1, proc_self_task);
if (-1 == proc_self_task) {
- const int task_fd = open("/proc/self/task/", O_RDONLY | O_DIRECTORY);
+ const int task_fd =
+ open("/proc/self/task/", O_RDONLY | O_DIRECTORY | O_CLOEXEC);
PCHECK(0 <= task_fd);
const bool result = IsSingleThreadedImpl(task_fd);
PCHECK(0 == IGNORE_EINTR(close(task_fd)));
« no previous file with comments | « sandbox/linux/seccomp-bpf/sandbox_bpf_test_runner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698