Chromium Code Reviews| Index: ipc/ipc_channel_posix.cc |
| diff --git a/ipc/ipc_channel_posix.cc b/ipc/ipc_channel_posix.cc |
| index 6ba1f607b3d000b0619b8d77b994ce646c205007..6d8484d22f6f99422c7f582a36bef0c6c62800f1 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 crashing because of the seccomp sandbox. |
|
dmichael (off chromium)
2015/02/02 23:43:38
s/crashing/crash
hidehiko
2015/02/03 04:53:13
Done.
|
| + 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() { |