[GRASS5] New IPC XDRIVER vs. fifo vs. UNIX Sockets???

Eric G . Miller egm2 at jps.net
Mon Nov 13 00:47:13 EST 2000


As we look to implement this new IPC messaging XDRIVER, it's come up
that some *nix variants may not support SYSV message queues.  That's
kind of a problem since the whole idea is to improve compatibility and
possibly performance.  Unfortunately, the FIFOs don't work under CygWin
(correct ?).  So, a third alternative is using sockets.

I've been rummaging around and noted that:
a) CygWin apparently supports UNIX sockets (presumably both AF_INET and
   AF_LOCAL).
b) Virtually all *nix's support local UNIX sockets (is this not true?).
c) XFree86 4.0.1 runs under CygWin now (haven't looked at details).

So, I've been playing with updating parts of necessary code to use local
unix sockets (AF_LOCAL, sockaddr_un).  Anyway, I'm no expert in this
area, but think this could be a viable solution (if it's decided that
portability for the IPC mechanism is a problem).  However, several
bits of code would have to change, because:

a) The whole fifo thing would have to disappear.
b) The socket file must not exist before bind() is called.  This
   would necessitate a change in many of the semantics for testing
   whether a monitor is running or not.
c) Only one file descriptor is needed.
d) Need to be able to pass around a 'struct sockaddr_un'.
e) There'd need to be a different mechanism for identifying the
   socket file associated with the monitors (perhaps some different
   environment variables?).
f) Other things I haven't thought of or come across...

I've focused on local sockets only because it reduces some of the
security checks that are necessary.  Anyway, I know some of you problem
have more experience with this stuff than I, so I'd appreciate any
comments.

--
Eric G. Miller <egm2 at jps.net>


---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list