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