[zeromq-dev] making inproc into transproc

Michael Haberler mail17 at mah.priv.at
Wed Jan 29 22:09:20 CET 2014


I understand the inproc sockets are dead-fast but inproc-only because the eventfd notification is used, which is compatible with  poll(2)

eventfd normally is used between threads or processes with common ancestors

however, it is possible to pass eventfd file descriptors between arbitrary processes using a somewhat arcane Unix socket/sendmsg/SCM_RIGHTS mechanism, which lifts the 'common ancestor' restriction;  I had to solve this working on a problem unrelated to zeroMQ (lock-free queues in shared memory, no common ancestor processes on either side). But it might be used in zeroMQ by placing ypipes into shared memory and and pass the eventfd's between processes. In my scenario I might also need to signal an eventfd from kernel space; there's an API for that.

Here is a working solution to the 'passing eventfd's between unrelated processes' problem : https://github.com/mhaberler/libancillary 

- Michael

ok, the subject was a joke;)


More information about the zeromq-dev mailing list