RE: lanuchd questions
RE: lanuchd questions
- Subject: RE: lanuchd questions
- From: "Karan, Cem (Civ, ARL/CISD)" <email@hidden>
- Date: Mon, 20 Oct 2008 16:34:01 -0400
- Thread-topic: lanuchd questions
Truthfully, I'd rather petition Apple to make it a part of launchd. The
moment we have dependencies, then we have to worry about cycles
(deadlock), deciding what to do if a process that we're dependent on
goes down, etc. And, now that I'm thinking about it, there is another
cheesy method to handle the problem. Write a script that launchd
launches that runs your first program. When that program returns, the
script submits the other programs to launchd via 'launchctl submit'.
Since we haven't put anything into /Library/LaunchDaemons or the other
launchd places, we get the same effect as using /var/run, so everything
is always launched in the correct order each time we reboot.
Thanks,
Cem Karan
> -----Original Message-----
> From: Jordan K. Hubbard [mailto:email@hidden]
> Sent: Monday, October 20, 2008 3:27 PM
> To: Dave Zarzycki
> Cc: Karan, Cem (Civ, ARL/CISD); Darwin Dev; Damien Sorresso
> Subject: Re: lanuchd questions
>
>
> On Oct 20, 2008, at 7:04 AM, Dave Zarzycki wrote:
>
>
> A cheesy way to accomplish this goal would be leverage
> the launchd conditional keep alive logic and the fact that
> /var/run is guaranteed to be cleaned at boot. This would
> involve breaking each daemon out into a separate launchd job
> that is conditionally kept alive whenever
> /var/run/my-script-is-done exists. The script on the other
> hand, is also a launchd job, and is kept alive as long as
> /var/run/my-script-is-done does NOT exist. This script MUST
> "touch" /var/run/my-script-is-done to signal launchd to stop
> relaunching the script and begin relaunching the daemons.
>
>
>
> You're right, that's pretty cheesy. :-)
>
> Seems like we keep coming up against this "but I want these
> jobs to be sequential!" requirement again and again. "In the
> large" I also agree that sequential job launch is very
> fragile ("on demand" being so much more forgiving of
> unanticipated events and configuration changes) but I think
> there is still a legit need for small groups of things (4-5
> items, max) to be able to depend on one another. Sounds like
> a job for the legendary "launchd helper"! :-)
>
> - Jordan
>
> P.S. If we don't want to write that helper, perhaps we should
> communicate our thoughts on it to a wider audience and see if
> someone else does!
>
_______________________________________________
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