Re: Modifying launchd-compliant daemon's plist from within the deamon.
Re: Modifying launchd-compliant daemon's plist from within the deamon.
- Subject: Re: Modifying launchd-compliant daemon's plist from within the deamon.
- From: "Maxim Zhuravlev" <email@hidden>
- Date: Tue, 5 Aug 2008 21:58:34 +0400
Hi, Dave.
> We'd advise against using the launchd configuration file as a substitute for
> a real configuration file. Please consider just leaving "RunAtLoad" == true
> and then have your program read a configuration file to determine whether
> any action is necessary.
Actually, some questions arise on the way:
1) Are there any launchd-provided or another *out-of-the-box* ways to
distinguish, whether the daemon is launched at boot time or by
WatchPaths paths modification, so that it can decide to proceed with
conditional or unconditional processing respectively?
2) And still, if I refactor my code to use ex. sockets, how do I
change RunAtLoad key value from within the daemon?
Would
launch_data_set_bool (runatload_key, ( user_defined_value ==
true_value ) ? true: false )
be enough, or do I need to send some message?
I insist, cause this seems to be the most elegant way so far.
Thanks in advance,
- Maxim.
_______________________________________________
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