Mach ports and namespaces

  • Greetings,

    I'm trying to solve a problem I'm having the distributed objects
    in Cocoa. I have several processes that get started in different
    ways (application, helper, daemon, ...).

    My problem is that some of those processes are in different Mach
    namespaces. Since (it appears that) Cocoa DO uses Mach ports for
    interprocess communications, I have processes that can't connect
    to other processes.

    Is it possible to connect with a Mach port in a different
    namespace? [ solution would be to pass the port id to the other
    process and use that to create an NSMachPort object ]

    Is it possible to create a Mach port in a different namespace? [
    solution would be to register/create the connection in a common
    name space accessible to all processes ]

    Is it possible to use some other local inter-process
    communications port like BSD pipes/sockets (NOT TCP/IP)?

    --
    James Bucanek
  • On Sep 10, 2007, at 9:41 AM, James Bucanek wrote:

    > Greetings,
    >
    > I'm trying to solve a problem I'm having the distributed objects in
    > Cocoa. I have several processes that get started in different ways
    > (application, helper, daemon, ...).
    >
    > My problem is that some of those processes are in different Mach
    > namespaces. Since (it appears that) Cocoa DO uses Mach ports for
    > interprocess communications, I have processes that can't connect to
    > other processes.
    >
    > Is it possible to connect with a Mach port in a different
    > namespace? [ solution would be to pass the port id to the other
    > process and use that to create an NSMachPort object ]
    >
    > Is it possible to create a Mach port in a different namespace?
    > [ solution would be to register/create the connection in a common
    > name space accessible to all processes ]
    >
    > Is it possible to use some other local inter-process communications
    > port like BSD pipes/sockets (NOT TCP/IP)?

    Technical Note TN2083 Daemons and Agents discusses namespaces and
    some of the problems you might encounter with Mach ports. There might
    be something in there that will help you.

    <http://developer.apple.com/technotes/tn2005/tn2083.html>

    Dave
previous month september 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Go to today