Jordan Brown wrote:
>>> What would you expect to happen, formally, if you were to svcadm 
>>> disable a service while its start method was running?  (I know what 
>>> I've actually seen - it runs the (null) stop method after the start 
>>> method exits - but that could just be a race.)
>>   If the start method succeeds, I would formally expect the stop method
>>   to be run.  Even though you've disabled the service, the completion
>>   of the start method means the service is put in the online state.
>>   Movement out of that state is always accompanied by executing the
>>   stop method.
> 
> So you would expect the start method to be allowed to complete, and then 
> the stop method to be invoked?

   I believe we only interrupt a start method if it times out or fails.

> It doesn't actually matter to me whether the start method is allowed to 
> complete, since the svcadm disable is the last thing it does, but I 
> don't want to confuse SMF.

   It should be treated no differently than an 'svcadm disable' that is
   invoked simultaneously with the running of the start method from
   another context.

   The thing you should take care to not do is 'svcadm disable -s' from
   the start method.

   Dave


Reply via email to