Question about IPC implementation

33 views
Skip to first unread message

Y.Sanachan

unread,
Oct 26, 2012, 11:58:38 AM10/26/12
to chromium...@chromium.org
Hi there,

I have a question about IPC implementation.
I have built chromium on Linux x86-64 environment.

I am studying the IPC implementation between browser-process,
renderer-process and plugin-process.
From my understanding, the number of socket file descriptor to browser
is always 3.
It has been prepared and opened in browser-process before fork
renderer-process or plugin-process.
After called fork() and execv() system call, a socket fd=3 can be used
from renderer/plugin-process, and then
it is possible to be communicated between browser-process and
renderer/plugin-process via socket.

However, I think there is one more connection of socket between
renderer-process and plugin-process.
It has been created after launched-up plugin-process. Maybe the trigger
is PluginProcessMsg_CreateChannel, and
plugin-process calls socketpair() system call after received.
But I cannot understand how to connect renderer-process to
plugin-process. plugin-process sends
PluginProcessHostMsg_ChannelCreated as response to a
PluginProcessMsg_CreateChannel.
This is sent from plugin-process to browser-process...
Could you give me a hint ?

Best Regards,
Sanachan.

Sanachan

unread,
Oct 27, 2012, 12:12:20 PM10/27/12
to chromium...@chromium.org
Hi,

I have been able to understand the mechanism how to connect a socket
from renderer-process to plugin-process. That is depended on the system call of
socketpair(), sendmsg() and recvmsg().

Thanks,
Sanachan.


2012年10月27日土曜日 0時58分52秒 UTC+9 Sanachan:
Reply all
Reply to author
Forward
0 new messages