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

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

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/services/syscall_wrappers.cc ('k') | sandbox/linux/syscall_broker/broker_client.cc » ('j') | 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/services/syscall_wrappers.cc ('k') | sandbox/linux/syscall_broker/broker_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698