"Jordan Brown (Sun)" wrote:
> Roland Mainz wrote:
> > How does SMF detect that a child process failed ?
> 
> svc.startd(1M) says that a contract-model service has failed if:
>         o  all processes in the service exit
>         o  any processes in the service produce a core dump

How is this detected ?

>         o  a process outside the service sends a service process a
>            fatal  signal (for example, an administrator terminates
>            a service process with the pkill command)

What happens if a process within the service sends another process
within the service a SIGKILL and doesn't reap the child's corpse
immediately ? And what happens if the same happens between threads of
the same process (which will be important since we're going to add
thread support to ksh93 and these threads should be able to communicate
via signals, too) ?

> > Note that any exit
> > code from 0 ... 255 is _valid_ for shell scripts and applications and
> > killing whole services just because a child process returned a non-zero
> > exit code may not be a good idea (I hope it's not implemented this way).
> 
> I don't believe it is.

Any idea who may know this exactly ?

> > The same applies to SIGTERM and other signals - shell scripts sometimes
> > employ signals for communication and that includes even stuff like
> > SIGTERM and SIGHUP and the child processes may not be cleaned-up
> > immediately (for example if there are other events to process the
> > reaping of dead children may need some time).
> 
> Here it's mixed.  Note that the rule above talks about a process outside
> the service (I presume that means in a different contract) sending a
> fatal signal (I presume that means that it's not being caught).

Is there a way to turn this behaviour "off" ?

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

Reply via email to