Re: [launchd-dev] launchd-dev Digest, Vol 27, Issue 5
How would a WatchPath help the situation? launchd already starts me when something tries to connect to the socket. launchd only reads your plist at startup/login, so changing the StartInterval on disk will do nothing (unless you know something I don't). Currently, if modifying the job in memory isn't possible, I think the best options are to either run all the time and manage timings myself, or to modify the StartInterval on disk and fire up a helper tool to unload/reload my plist (which really should not happen too often). If clients are connected, they'll be booted out for a few seconds and reconnect themselves. No big loss. On Fri, Sep 18, 2009 at 2:48 PM, Nehemiah Dacres <vivacarlie@gmail.com> wrote:
so you want the ability to connect to it ALL the time but dont want it running All the time. note that a waiting process doesn't take that much proessor time if its not doing anything but listening to a socket but if you must you can have the client program modify a file on a path and set the server's launchd.plist for "WatchPaths" to start the daemon when said path is altered. I guess you can change startInterval or IdleTime from the program, the test (which I may not perform later) is if the start interval will be changed if the file is not reloaded unto launchd after altering. I would say
On Fri, Sep 18, 2009 at 1:12 PM, Sidney San Martín <s@sidneysm.com> wrote:
It won't. The daemon manages its timing while running, and would work (with no modifications) with KeepAlive and no OnDemand keys at all. I'd just rather NOT have the daemon idling away all day when launchd has a perfectly good mechanism for launching it periodically.
On Fri, Sep 18, 2009 at 1:12 PM, Nehemiah Dacres <vivacarlie@gmail.com> wrote:
I see no reason not to let the daemon time out and exit until a client tries to connect or until its next checkin.
neither do I, but who says the program will start up if its already running?
--
"lalalalala! it's not broken because I can use it"
http://linux.slashdot.org/comments.pl?sid=194281&threshold=1&commentsort=0&m...
--
"lalalalala! it's not broken because I can use it"
http://linux.slashdot.org/comments.pl?sid=194281&threshold=1&commentsort=0&m...
participants (1)
-
Sidney San Martín