Jose Maria Lopez Hernandez wrote:
> Amit Yadav wrote:
> > Hi,
> >
> > In linuc what's the difference between the the default action for
the
> > SIGTERM and SIGKILL signals ??
>
> A program can receive a SIGTERM signal and ignore it or do some
things
> and then terminate, but if it receives a SIGKILL it's automatically
> killed.
>
> Regards.
>
> >
> > Thanks
> >
> > Amit.
> >
>
>
> --
>
> Jose Maria Lopez Hernandez
> Director Tecnico de bgSEC
> (E-Mail Removed)
> bgSEC Seguridad y Consultoria de Sistemas Informaticos
> http://www.bgsec.com
> ESPAÑA
>
> The only people for me are the mad ones -- the ones who are mad to
live,
> mad to talk, mad to be saved, desirous of everything at the same
time,
> the ones who never yawn or say a commonplace thing, but burn, burn,
burn
> like fabulous yellow Roman candles.
> -- Jack Kerouac, "On the Road"
The default action for a given signal is architecture dependent. Since
we're discussing linux here though, here's relevant information on
SIGKILL from the signal(7) manpage:
The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored.
The POSIX.1 standard defines default actions for SIGTERM and SIGKILL to
be process termination, so by default, SIGKILL will try to kill the
current process immediately. Sometimes, the process will not
immediately be terminated, like when it is performing disk I/O; this
rarely happens in practice.
-dave