[zeromq-dev] IPC (again)
sustrik at 250bpm.com
Mon Jan 4 18:46:23 CET 2010
> Hi Martin, erik
> personally i quite like the idea of using a shared named pipe, then
> passing the the fd.
Yes, that's the simplest option. It requires some investigation whether
passing a descriptor via unix domain socket is guaranteed to be atomic.
If not so, data for multiple file descriptors passed through the socket
can be interleaved resulting in a nasty mess.
> the reason for that is if you are going to do communication over pipes, then
> it might be reasonable to assume the app is not doing tcp at all.....
That's a good idea. We can even introduce a new configure option
--with-tcp so that TCP support can be turned off altogether making the
On the other hand, IPC can be implemented as an optimisation of TCP
transport (thus tcp://127.0.0.1:5555 would be automatically passed via a
The former option feels somewhat neater IMO.
> on solaris there is an ioctl for passing the FD between processes, or we
> could use more portable posix code (probabky better).
Stevens suggests using sendmsg, sending the file descriptor as ancillary
data of SCM_RIGHTS type.
More information about the zeromq-dev