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

Unified Diff: ipc/ipc_channel_posix.cc

Issue 879303004: Non-SFI mode: Use dummy PID for NaCl's IPC channel for nacl_helper_nonsfi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months 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 | « ipc/ipc_channel.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_posix.cc
diff --git a/ipc/ipc_channel_posix.cc b/ipc/ipc_channel_posix.cc
index 6ba1f607b3d000b0619b8d77b994ce646c205007..d853e4e535d03e6c2643d54057a3a9a281eab380 100644
--- a/ipc/ipc_channel_posix.cc
+++ b/ipc/ipc_channel_posix.cc
@@ -773,14 +773,20 @@ void ChannelPosix::ClosePipeOnError() {
}
int ChannelPosix::GetHelloMessageProcId() const {
+#if defined(OS_NACL_NONSFI)
+ // In nacl_helper_nonsfi, getpid() invoked by GetCurrentProcId() is not
+ // allowed and would cause a SIGSYS crash because of the seccomp sandbox.
+ return -1;
+#else
int pid = base::GetCurrentProcId();
#if defined(OS_LINUX)
// Our process may be in a sandbox with a separate PID namespace.
if (global_pid_) {
pid = global_pid_;
}
-#endif
+#endif // defined(OS_LINUX)
return pid;
+#endif // defined(OS_NACL_NONSFI)
}
void ChannelPosix::QueueHelloMessage() {
« no previous file with comments | « ipc/ipc_channel.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698