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: open fails in daemon



On Wednesday, July 23, 2003, at 5:50 PM, Garth Cummings wrote:
Actually, why call daemon() at all? If you're launched from a startup item, you're already running as a background process and, if you don't call anything requiring a window server connection, you'll keep running until shutdown.

It is somewhat common to have your daemon validate parameters, etc... and get initialized so it can be "found" while the launching startup script waits. Then, when it is ready, the daemon calls daemon() to release the parent (letting the startup script continue) knowing that all dependencies on the daemon can now be met (starting everything with & out of the startup scripts plays havoc on explicit dependency management).

But it's this very act of "initializing some things before the daemon() call" that gets you in trouble with upper-level frameworks. It is somewhat of a catch-22. We know it, and want to fix it. But...it's not trivial.

--Jim
_______________________________________________
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: 
 >Re: open fails in daemon (From: Garth Cummings <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.