Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About mach_init.d



While Jim is able to describe the mach_init.d mechanism far better than I can, I notice that configd, diskarbitrationd, and lookupd are all open source components which use it.

- Kevin

On May 21, 2004, at 3:04 AM, Stiphane Sudre wrote:

There's one point I don't get with this architecture.

I have a daemon which is listening on a CFMessagePort named "toto".

I added a .plist file in mach_init.d and set OnDemand to true and the ServiceName to toto

What I expected was that when I send a CFMessagePort to the "toto" server, the daemon would be launched "if needed" and then would process the message.

From what I'm seeing, things are happening differently: the daemon is just launched and the message is "lost". If I then resend the message, it's processed.

So how is it supposed to work? The documentation is completely unclear (non-existent IMHO) on this point.

Do I need to have 2 MessagePort listeners with different names: one for the wake-up and one for processing and always send 2 messages to be sure it works?

Is the ServiceName just a fake message_port which is not to be in the daemon?

Is there a sample code well hidden somewhere?
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.


References: 
 >About mach_init.d (From: Stéphane Sudre <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.