Gary Winiger writes: > Looking at existing services, svc.startd(1M), and smf_restarter(5), there > seem to be two ways to define a service as transient. All the existing > services I've found use > <property_group name='startd' type='framework'> > <propval name='duration' type='astring' value='transient' /> > </property_group> > even though they all appear to be single instance services. My reading > of smf_restarter(5) leads me to believe I could declare a service to be > <transient_process /> > Are these equivalent? Which is preferred (and perhaps why ;-)?
Because there ended up being more than one type of service duration: contract, transient, and wait. Before S10 shipped we replaced the transient_process property with the duration property. (I don't think there was ever a transient_process tag in the DTD, but could be misremembering that particular piece of history.) The fact that there are vestiges in smf_restarter(5) is a bug. :( > Second question, is it safe to have a dependency on a transient service > when the dependent service requires the completion of a possibly long > running start method (i.e., something that does significant work, but > does not stay around after finishing its work -- that is not a daemon)? > If not, what is the preferred way to provide for such a dependency? Whether it's transient or a long-running (contract) service doesn't change how you'd specify the dependency. How long the startup takes also doesn't matter, as if it you need the dependency to do its work before the dependent starts you need to wait as long as it takes. :) liane -- Liane Praza, Solaris Kernel Development liane.praza at sun.com - http://blogs.sun.com/lianep