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

Unified Diff: ipc/ipc_channel.cc

Issue 695353005: Non-SFI mode: Use dummy PID for NaCl's IPC channel on Linux platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: ipc/ipc_channel.cc
diff --git a/ipc/ipc_channel.cc b/ipc/ipc_channel.cc
index 4a4e40ddc1fb82bfa2bbeeff49cf0917b252ef7a..ae7e7a4aa738c69917299cd8a2872fe08cd6d43f 100644
--- a/ipc/ipc_channel.cc
+++ b/ipc/ipc_channel.cc
@@ -29,7 +29,13 @@ std::string Channel::GenerateUniqueRandomChannelID() {
// component. The strong random component prevents other processes from
// hijacking or squatting on predictable channel names.
+#if defined(OS_NACL_NONSFI)
+ // nacl_helper_nonsfi does not allow to use getpid() (it would cause SIGSYS
dmichael (off chromium) 2014/11/05 23:48:41 nit: the grammar here could be better. How about:
hidehiko 2014/11/06 14:19:30 Done. Thank you for suggestion.
+ // crashing because of seccomp sandbox), so here we use dummy PID.
+ int process_id = -1;
+#else
int process_id = base::GetCurrentProcId();
+#endif
return base::StringPrintf("%d.%u.%d",
process_id,
g_last_id.GetNext(),
« no previous file with comments | « ipc/ipc_channel.h ('k') | ipc/ipc_channel_posix.h » ('j') | ipc/ipc_channel_posix.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698