Chromium Code Reviews| Index: ipc/ipc_channel_posix.cc |
| =================================================================== |
| --- ipc/ipc_channel_posix.cc (revision 47443) |
| +++ ipc/ipc_channel_posix.cc (working copy) |
| @@ -273,7 +273,7 @@ |
| server_listen_pipe_(-1), |
| pipe_(-1), |
| client_pipe_(-1), |
| -#if defined(OS_LINUX) |
| +#if !defined(OS_MACOSX) |
| fd_pipe_(-1), |
| remote_fd_pipe_(-1), |
| #endif |
| @@ -384,7 +384,7 @@ |
| scoped_ptr<Message> msg(new Message(MSG_ROUTING_NONE, |
| HELLO_MESSAGE_TYPE, |
| IPC::Message::PRIORITY_NORMAL)); |
| - #if defined(OS_LINUX) |
| + #if !defined(OS_MACOSX) |
| if (!uses_fifo_) { |
| // On Linux, the seccomp sandbox makes it very expensive to call |
| // recvmsg() and sendmsg(). Often, we are perfectly OK with resorting to |
| @@ -460,7 +460,7 @@ |
| // Read from pipe. |
| // recvmsg() returns 0 if the connection has closed or EAGAIN if no data |
| // is waiting on the pipe. |
| -#if defined(OS_LINUX) |
| +#if !defined(OS_MACOSX) |
| if (fd_pipe_ >= 0) { |
| bytes_read = HANDLE_EINTR(read(pipe_, input_buf_, |
| Channel::kReadBufferSize)); |
| @@ -592,7 +592,7 @@ |
| if (m.header()->num_fds > num_fds - fds_i) { |
| // the message has been completely received, but we didn't get |
| // enough file descriptors. |
| -#if defined(OS_LINUX) |
| +#if !defined(OS_MACOSX) |
| if (!uses_fifo_) { |
| char dummy; |
| struct iovec fd_pipe_iov = { &dummy, 1 }; |
| @@ -682,7 +682,7 @@ |
| if (!m.ReadInt(&iter, &pid)) { |
| NOTREACHED(); |
| } |
| -#if defined(OS_LINUX) |
| +#if !defined(OS_MACOSX) |
| if (mode_ == MODE_SERVER && !uses_fifo_) { |
| // On Linux, the Hello message from the client to the server |
|
Evan Martin
2010/05/19 11:50:11
s/Linux/non-Mac/
|
| // also contains the fd_pipe_, which will be used for all |
| @@ -745,7 +745,7 @@ |
| while (!output_queue_.empty()) { |
| Message* msg = output_queue_.front(); |
| -#if defined(OS_LINUX) |
| +#if !defined(OS_MACOSX) |
| scoped_ptr<Message> hello; |
| if (remote_fd_pipe_ != -1 && |
| msg->routing_id() == MSG_ROUTING_NONE && |
| @@ -806,7 +806,7 @@ |
| // num_fds < MAX_DESCRIPTORS_PER_MESSAGE so no danger of overflow. |
| msg->header()->num_fds = static_cast<uint16>(num_fds); |
| -#if defined(OS_LINUX) |
| +#if !defined(OS_MACOSX) |
| if (!uses_fifo_ && |
| (msg->routing_id() != MSG_ROUTING_NONE || |
| msg->type() != HELLO_MESSAGE_TYPE)) { |
| @@ -828,7 +828,7 @@ |
| if (bytes_written == 1) { |
| fd_written = pipe_; |
| -#if defined(OS_LINUX) |
| +#if !defined(OS_MACOSX) |
| if (mode_ != MODE_SERVER && !uses_fifo_ && |
| msg->routing_id() == MSG_ROUTING_NONE && |
| msg->type() == HELLO_MESSAGE_TYPE) { |
| @@ -999,7 +999,7 @@ |
| Singleton<PipeMap>()->RemoveAndClose(pipe_name_); |
| client_pipe_ = -1; |
| } |
| -#if defined(OS_LINUX) |
| +#if !defined(OS_MACOSX) |
| if (fd_pipe_ != -1) { |
| HANDLE_EINTR(close(fd_pipe_)); |
| fd_pipe_ = -1; |