On Apr 9, 2009, at 9:30 AM, Bill Janssen wrote:
Michael Smith <
email@hidden> wrote:
It's usually straightforward for the daemon to vend the appropriate
self-manipulation functionality; frequently you want to gate this with
application-specific logic anyway.
Well, the daemon does a lot of things, but what I'm concerned with is
stop, start, and restart.
Why do you need 'stop'? Why can't you just ask the daemon to enter a state where it refuses requests?
If you ask the daemon to operate on itself, you can easily implement:
• start accepting requests
• start refusing requests (except for starts)
• exit (and cause launchd to restart, e.g. for updates)
• unload yourself (for uninstall)
= Mike