Quoth James Deng D (SH/CBC) on Fri, Aug 25, 2006 at 06:24:35PM +0800:
> I created a service manifest xml file,  the start method is a shell
> script (say SCRIPT)which wraps my MAIN process.
> Actually 'exec MAIN' is called in this script. And MAIN will startup
> many PLUGINs
> And the properties are like this: 
...
>       <property_group name='startd' type='framework'>
>               <propval name='ignore_error' type='astring' value='core, 
> signal' />
>               <propval name='duration' type='astring' value='contract' />     
>         
>       </property_group>
> 
> Coredump from PLUGINs and Killing PLUGINs will not cause the whole
> contract to be killed, because MAIN can monitor those PLUGINs and
> restart them its self, so I used 'ignore_error' as above.  
> But when I kill -9 MAIN separately, SMF will do nothing(did not kill all
> subprocess and restart MAIN), does SMF treat MAIN also as a 'subprocess'
> and just ignore the kill signal?

Yes; the framework does not distinguish processes in the contract.

>                                  Does this conflict with the
> 'ignore_error'?

No.  ignore_error is meant for services which cannot be modified to
launch children in separate contracts.  This does not imply that the
framework should figure out which process is the lead, and handle it
separately.  For that, the process should launch children separate
contracts.

>                 I just want the whole contract to be killed and the
> service to be restarted when I kill MAIN, that means SMF only ignores
> coredump and signal from PLUGINs, but not MAIN. 

We don't have an easy way to do this, and we won't add one because such
a service should use contracts.  To achieve the stopping-main-stops-
plugins behavior, you'll have to have main's stop method stop the
plugins.

> It seams that any the 'ignore_error' is effective for all processes,
> right?

Right.


David

Reply via email to