summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel.h
diff options
context:
space:
mode:
authorhubbe@chromium.org <hubbe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-15 00:07:00 +0000
committerhubbe@chromium.org <hubbe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-15 00:07:00 +0000
commitdc875dc95290a9a5e4245e24e209a0496038f46c (patch)
tree30af6bb90080078ebe4adb96fe1c2a50df199f94 /ipc/ipc_channel.h
parent3a678cfe431c44d9397e4616c676578f58ed69ca (diff)
downloadchromium_src-dc875dc95290a9a5e4245e24e209a0496038f46c.zip
chromium_src-dc875dc95290a9a5e4245e24e209a0496038f46c.tar.gz
chromium_src-dc875dc95290a9a5e4245e24e209a0496038f46c.tar.bz2
Alternative workaround for mac kernel bug.
BUG=298276 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=227999 Review URL: https://codereview.chromium.org/25325002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228569 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_channel.h')
-rw-r--r--ipc/ipc_channel.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/ipc/ipc_channel.h b/ipc/ipc_channel.h
index f65a62b..7e09a80 100644
--- a/ipc/ipc_channel.h
+++ b/ipc/ipc_channel.h
@@ -75,15 +75,22 @@ class IPC_EXPORT Channel : public Sender {
#endif
};
- // The Hello message is internal to the Channel class. It is sent
- // by the peer when the channel is connected. The message contains
- // just the process id (pid). The message has a special routing_id
- // (MSG_ROUTING_NONE) and type (HELLO_MESSAGE_TYPE).
+ // Messages internal to the IPC implementation are defined here.
+ // Uses Maximum value of message type (uint16), to avoid conflicting
+ // with normal message types, which are enumeration constants starting from 0.
enum {
- HELLO_MESSAGE_TYPE = kuint16max // Maximum value of message type (uint16),
- // to avoid conflicting with normal
- // message types, which are enumeration
- // constants starting from 0.
+ // The Hello message is sent by the peer when the channel is connected.
+ // The message contains just the process id (pid).
+ // The message has a special routing_id (MSG_ROUTING_NONE)
+ // and type (HELLO_MESSAGE_TYPE).
+ HELLO_MESSAGE_TYPE = kuint16max,
+ // The CLOSE_FD_MESSAGE_TYPE is used in the IPC class to
+ // work around a bug in sendmsg() on Mac. When an FD is sent
+ // over the socket, a CLOSE_FD_MESSAGE is sent with hops = 2.
+ // The client will return the message with hops = 1, *after* it
+ // has received the message that contains the FD. When we
+ // receive it again on the sender side, we close the FD.
+ CLOSE_FD_MESSAGE_TYPE = HELLO_MESSAGE_TYPE - 1
};
// The maximum message size in bytes. Attempting to receive a message of this