Hi Antonello,

> Mark Fenwick wrote:
> > I have a simple SMF service which has a shell script as the start method.
> > The start method starts two daemons which fork(), how do I ensure that the
> > daemons end up in the same process contract ?
> > 
> > I want the service to restart both daemons should either of them exit, my
> > observation is that the service only restarts my daemons if I kill(1) one 
> > of the
> > processes, killing the other process does not.
> The way you described I would expect both deamons to be in the same 
> contract. Can you check if they are in the same contract? ps -o ctid -p 
> <pid> for both deamons.

I checked, both processes are in the same contract.

wadworth# ps -o ctid -p 453
 CTID
 1718
wadworth# ps -o ctid -p 455
 CTID
 1718
wadworth#  ctwatch -r 1718
CTID    EVID    CRIT ACK CTTYPE   SUMMARY

*** kill 455 - nothing *****

*** kill 453 *****
1718    1071    crit no  process  process 453 received a fatal signal
1718    1072    crit no  process  contract empty


BTW if I change my method so that it only launches a single daemon
then killing this process results in the service being restarted.

Mark
----------------------------------------------------------------------------
  Mark Fenwick, Solaris Security Technologies.
  TEL: +1 (650) 786 2733 (X82733)                     __o
  Sun Microsystems Inc, Menlo Park, California.      `\<,_
                                                   (*)/ (*)
----------------------------------------------------------------------------




Reply via email to