signal(3):

"Except for the SIGKILL and SIGSTOP signals, the signal() function
allows for any signal to be caught, to be ignored, or to generate an
interrupt."

On Thu, Jan 19, 2012 at 8:17 AM, Wesley M. <open...@e-solutions.re> wrote:
> Hi,
>
> I want to see a message on console when i send signal like HUP
> KILL INT and TERM
>
> using for example in a script "manageprocess":
>
>
> #!/bin/ksh
> trap 'echo Kill detected!' 9
> trap 'ctrl-c detected!' 2
>
> run
> it with sudo sh manageprocess
> No message appear
>
> Therefore if i run
> manually this : trap 'ctrl-c detected!' 2
> it works. But trap 'echo Kill
> detected!' 9 doesn't work.
> Why ? Why i can't use it in a script?
>
> Any idea
> ?
>
> Thank you very much.

Reply via email to