diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-10 08:15:02 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-10 08:15:02 +0000 |
commit | cef7c5267a3ae0618c4f7dfde61587a1f5addb6d (patch) | |
tree | 0e3e2760bc6bbd82da8b9d237449a4f206472eb5 /chrome | |
parent | d8480ab6be1853998fc053919a3194c14a42aebc (diff) | |
download | chromium_src-cef7c5267a3ae0618c4f7dfde61587a1f5addb6d.zip chromium_src-cef7c5267a3ae0618c4f7dfde61587a1f5addb6d.tar.gz chromium_src-cef7c5267a3ae0618c4f7dfde61587a1f5addb6d.tar.bz2 |
POSIX: fix file descriptor passing
The kernel sets msghdr.msg_controllen to the length of the received
control data on successful return. Thus, we need to reset this
variable to the length of the buffer before each call.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9471 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/common/ipc_channel_posix.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/common/ipc_channel_posix.cc b/chrome/common/ipc_channel_posix.cc index fc198e6..b688c77 100644 --- a/chrome/common/ipc_channel_posix.cc +++ b/chrome/common/ipc_channel_posix.cc @@ -364,9 +364,10 @@ bool Channel::ChannelImpl::ProcessIncomingMessages() { msg.msg_iov = &iov; msg.msg_iovlen = 1; msg.msg_control = input_cmsg_buf_; - msg.msg_controllen = sizeof(input_cmsg_buf_); for (;;) { + msg.msg_controllen = sizeof(input_cmsg_buf_); + if (bytes_read == 0) { if (pipe_ == -1) return false; |