site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com User-agent: Debian Thunderbird 1.0.7 (X11/20051017) In message <4472D0D3.8000002@teaching.physics.ox.ac.uk>, Graham J Lee writes: Hmm. Well, that suggests a way to resolve this fairly elegantly; just provide a hook in plists for having services Do Something which causes other services to run. So, say, you add a tag like <key>StartupDone</key> <string>Gzornenplatzen</string> in some plists, and in others, you have <key>StartupAfter</key> <string>Gzornenplatzen</string> Bam. Nice generic way to put the "something happened and I want to be run" *IN LAUNCHD WHERE IT BELONGS* rather than having all the applications sit around inventing new notification methods and writing their own code. That's the thing; in many cases, it's utterly trivial to explain what ordering I want. If I have an ordering tool, I need one or two lines of code somewhere. If I have to do all the arbitration by hand, I can end up doing callbacks and daemon communications in two or three different protocols at once. I'm confused as to why this is such a big deal for you. Chuck _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... Peter Seebach wrote: I think the argument would be that system startup is just a specific example of the general case "something interesting happened and I want to be run because of it", and that launchd deals with the happening of interesting things. I'd agree with that, if it were the argument :-) I agree both sides of the debate have a point. I think launchd has an excellent model and I don't think it should have the hooks you describe. I also agree, however, that there is a good case for support lowest-common-denominator apps. The problem is your assertion this this should be forced into launchd, where it doesn't belond. So write "an ordering tool", like you describe. It seems like it would be trivial to write a small program which waits for the launchd disk events you want and then runs a program. This could be your (unmodified) app, or someone else's apps, or a script which runs a bunch of scripts in an rc-like directory. As a bonus, thanks to launchd, in the event of a "it'll never happen" loss of volume (or just someone using your software over NFS and a flaky network), when things go away the same mechanism can request an orderly shutdown via scripts, kill or whatever. The over-engineering possibilities are endless, but the base app seems trivial. I'm sure there are a few sysadmins and other people with similar problems who's like to see such an app available, too. This email sent to site_archiver@lists.apple.com
participants (1)
-
Charles Gray