Index: sandbox/linux/seccomp-bpf/sandbox_bpf.cc |
diff --git a/sandbox/linux/seccomp-bpf/sandbox_bpf.cc b/sandbox/linux/seccomp-bpf/sandbox_bpf.cc |
index b598d769ba15b6f251a3f724f83c2033ab91d0b8..9fe503134015df4d3bd3ed1325b91b05172ee773 100644 |
--- a/sandbox/linux/seccomp-bpf/sandbox_bpf.cc |
+++ b/sandbox/linux/seccomp-bpf/sandbox_bpf.cc |
@@ -268,6 +268,10 @@ bool Sandbox::RunFunctionInPolicy(void (*code_in_sandbox)(), |
SANDBOX_DIE("Process started without standard file descriptors"); |
} |
+ // This code is using fork() and should only ever run single threaded. |
Jorge Lucangeli Obes
2013/12/10 21:14:08
nit: single-threaded.
jln (very slow on Chromium)
2013/12/10 21:42:00
Done.
|
+ // Most of the code below is "async-signal-safe" and only minor changes |
+ // would be needed to support threads. |
+ DCHECK(IsSingleThreaded(proc_fd_)); |
pid_t pid = fork(); |
if (pid < 0) { |
// Die if we cannot fork(). We would probably fail a little later |