• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: StartupItems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: StartupItems


  • Subject: Re: StartupItems
  • From: Charles Gray <email@hidden>
  • Date: Wed, 24 May 2006 11:33:02 +1000

Peter Seebach wrote:
In message <email@hidden>, Graham J Lee writes:

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 :-)


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.

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.

	Chuck
_______________________________________________
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


  • Follow-Ups:
    • Re: StartupItems
      • From: email@hidden (Peter Seebach)
References: 
 >Re: StartupItems (From: email@hidden (Peter Seebach))

  • Prev by Date: gdb and mach exceptions
  • Next by Date: Re: StartupItems
  • Previous by thread: Re: StartupItems
  • Next by thread: Re: StartupItems
  • Index(es):
    • Date
    • Thread