[SLE] A question about Linux signals and perl...
Hello all ! I just made a perl daemon script and I have a problem when I try to catch the KILL signal. If I kill my daemon with a command like this : kill pid I can catch the signal and make some shutdown operation but if I kill the demon with something like this : kill -9 pid I can't catch this signal . In the script I have a line like this : $SIG{ABRT}=$SIG{INT}=$SIG{TERM}=$SIG{KILL}=$SIG{QUIT}=\&signal_handler This signal (9 which means KILL I suppose ) can't be catch by perl ? -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
I just made a perl daemon script and I have a problem when I try to catch the KILL signal. If I kill my daemon with a command like this : kill pid I can catch the signal and make some shutdown operation but if I kill the demon with something like this : kill -9 pid I can't catch this signal . In the script I have a line like this : $SIG{ABRT}=$SIG{INT}=$SIG{TERM}=$SIG{KILL}=$SIG{QUIT}=\&signal_handler This signal (9 which means KILL I suppose ) can't be catch by perl ?
You can't catch the KILL signal. That's a feature of Linux. -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Hi, On Thu, May 11 2000 at 11:09 +0300, D.I. Coroiu Cosmin wrote:
I just made a perl daemon script and I have a problem when I try to catch the KILL signal. If I kill my daemon with a command like this : kill pid I can catch the signal and make some shutdown operation but if I kill the demon with something like this : kill -9 pid I can't catch this signal .
You cannot catch SIGKILL and SIGSTOP [1]. How would the super user kill/stop a runaway process if it could just ignore these signals? Ciao, Stefan [1] See `man 2 signal' -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Stefan Troeger wrote:
Hi,
On Thu, May 11 2000 at 11:09 +0300, D.I. Coroiu Cosmin wrote:
I just made a perl daemon script and I have a problem when I try to catch the KILL signal. If I kill my daemon with a command like this : kill pid I can catch the signal and make some shutdown operation but if I kill the demon with something like this : kill -9 pid I can't catch this signal .
Yes of course. You are right. Thanks ! Crosby.
You cannot catch SIGKILL and SIGSTOP [1]. How would the super user kill/stop a runaway process if it could just ignore these signals?
Ciao, Stefan
[1] See `man 2 signal'
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
participants (3)
-
crosby@sec.sibnet.ro
-
fountai@hursley.ibm.com
-
stefan.troeger@wirtschaft.tu-chemnitz.de