Huafeng Lu writes:
> 
> Hi,
> 
> I'm testing a smf wrapper that I wrote. After "svcadm enable ..." was
> issued, I saw repeated messages in the smf log file:
> 
>       [ Sep 24 19:24:29 Method "start" exited with status 0. ]
>       [ Sep 24 19:24:29 Stopping because all processes in service exited. ]
>       [ Sep 24 19:24:29 Executing stop method (:kill). ]
>       [ Sep 24 19:24:29 Restarting too quickly, changing state to 
> maintenance. ]
> 
> And it finally got into the maintenance state.
> 
> The program that the SMF start method calls is a daemon, which will
> return but still running in the background. I guess maybe the SMF
> services simply check if the program exits or not? How can I tell SMF
> framework about this so that it won't execute the stop method?
> 
> Thanks.
> --
> Huafeng
> 
> _______________________________________________
> smf-discuss mailing list
> smf-discuss at opensolaris.org

Hi Huafeng,

Are you sure that the daemon is still running?  I assume that you are
starting the background daemon using some form of fork/exec.  In this case
the daemon should be part of the service's conctact, and startd would be
aware that it is running.

Another other possibility is that you may have set the startd/duration
property in your manifest, so that the service model is not the contract
model.  The contract model is the default.

tom


Reply via email to