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

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

Issue 108173008: Linux Sandbox: check no threads before fork(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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/seccomp-bpf/sandbox_bpf.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/broker_process.cc
diff --git a/sandbox/linux/services/broker_process.cc b/sandbox/linux/services/broker_process.cc
index 316883d260a5c43dc3ecb95909a7efd10cd8ad23..438e9726374707a59d6555b96e8009c195081cae 100644
--- a/sandbox/linux/services/broker_process.cc
+++ b/sandbox/linux/services/broker_process.cc
@@ -21,6 +21,7 @@
#include "base/pickle.h"
#include "base/posix/eintr_wrapper.h"
#include "base/posix/unix_domain_socket_linux.h"
+#include "base/process/process_metrics.h"
#include "build/build_config.h"
#include "sandbox/linux/services/linux_syscalls.h"
@@ -146,6 +147,7 @@ bool BrokerProcess::Init(bool (*sandbox_callback)(void)) {
return false;
}
+ DCHECK_EQ(1, base::GetNumberOfThreads(base::GetCurrentProcessHandle()));
int child_pid = fork();
if (child_pid == -1) {
close(socket_pair[0]);
« no previous file with comments | « sandbox/linux/seccomp-bpf/sandbox_bpf.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698