Hi, I am writing a simple perl script that will catch kill signal. I am able to catch the signal sent within the script. However, if I kill the process in a shell using "kill -9 PID", the handler does not catch it. Can someone help me? Here is my code snippet.
==========Handler ================================= $SIG{TERM}=\&signal_handler_TERM; sub signal_handler_TERM{ $SIG{TERM} =\&signal_handler_TERM; print "---------Catching Term signal, Cleaning up--------\n"; exit(1); } =================================================== In perl script, if i use kill function as this "kill TERM => PID;" It works fine. However, if I issue kill signal from shell like this "kill -9 PID", PID is killed but signal is not caught by signal_handler_TERM. Thanks in advance. __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>