Re: StartupItems
Re: StartupItems
- Subject: Re: StartupItems
- From: email@hidden (Peter Seebach)
- Date: Mon, 22 May 2006 13:19:47 -0500
In message <a06010200c097a2d8ab74@[192.168.0.222]>, Peter Bierman writes:
>No, the IPC mechanisms that launchd tunnels are generally ones that
>block on connection attempts. So clients can be completely unaware of
>launchd, or whether the service is always running or launched on
>demand. And servers only need to declare to launchd what their
>existing IPC mechanism is via a plist.
The obvious counterexamples are sockets and file access.
Which are, by strange coincidence, 99% of UNIX services.
>If your code is an existing IPC service, it's trivial to define that
>service in a launchd.plist.
What, like a webserver that needs name service to run? Apache fails if
there's no name service.
>If your code is an IPC service that's currently wrapped in a
>StartupItem, consider moving to launchd so that your clients don't
>need to also use a StartupItem to declare their dependencies. That's
>the major advantage of launchd: clients just use the services they
>need, there's no additional declaration of dependency required.
That's not an advantage of launchd; that's an advantage of IPC mechanisms
which block connection attempts. They would be just fine with
daemon1 &
daemon2 &
daemon3 &
What's the launchd way for my existing program which runs on 30 other UNIX
platforms to request that it be launched only when a configuration file it
needs is accessible? On other systems, I'd put it in startup after all the
disk-mounting. What do I do in the launchd model? My program doesn't have
any hooks for querying disk availability, *BECAUSE THAT IS THE JOB OF THE
STARTUP SYSTEM*. Or at least, always has been.
The complications of dependency checking have not been removed; they've been
moved from specifications in the plist file (or rc file, or whatever) into
extra code in my application.
In some cases, the existing code can already delay gracefully. In other
cases, not so much.
What's the launchd way for my existing program, which scans for running
network interfaces and binds to them, to ensure that it's run only after the
network is up? I don't care about laptop issues, I'm writing a server app.
I don't want to have to add special code to my app to scan repeatedly because
ONE SYSTEM won't let me just schedule my item "after the network is up".
-s
_______________________________________________
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