Opening, and blocking on, a mach port.
Opening, and blocking on, a mach port.
- Subject: Opening, and blocking on, a mach port.
- From: Michael Bishop <email@hidden>
- Date: Wed, 15 Dec 2004 15:36:42 -0800
Hi fellow developers,
I've got a specific problem that I have been able to solve with the
Darwin notification APIs. The problem is, I just discovered these are
not available prior to Panther so I need to do the same thing using a
lower layer. I was wondering if any of you had some suggestions or
documentation you could point me to.
Here is the problem I'm trying to solve.
- cmd-line program opens up mach port
- cmd-line program sends apple event to running GUI application and
includes the port id in message
- cmd-lin program blocks waiting for a message on the mach port
- GUI program receives apple event, does some operation
- finished operation and writes to the mach port passed in through the
apple event
- GUI program disposes of any references to the mach port
- cmd-line program awakens because of the write to the mach port
- cmd-line program closes port and exits.
This was really easy with the notify apis. The cmd-line could just
register for a notification and get a file handle. Then, it could call
select() on the file which would block. Through the notification apis,
the file would have a notification written to it which would awaken the
cmd-line program.
I'm all set to use raw mach ports now, I just don't know where to
begin. Can someone help me find documentation for:
- opening ports
- blocking waiting for a message
- sending a message.
I'm pretty unfamiliar with this stuff so at this point, I'm pretty much
a novice.
Thank you,
_ michael
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden