Results 1 to 2 of 2
SIGKILL & SIGTERM are signals sent by shutdown but i am not able to catch these signals when all terminals are killed ...i want a program that could catch signal ...
- 02-20-2011 #1Just Joined!
- Join Date
- Feb 2011
- Posts
- 3
Catch signal sent by linux os on shutdown
SIGKILL & SIGTERM are signals sent by shutdown but i am not able to catch these signals when all terminals are killed ...i want a program that could catch signal sent by linux os on shutdown or logout
- 02-20-2011 #2
You can't catch SIGKILL. It is the nature of this signal that no program can handle it. A program that receives SIGKILL just crashes and that's that.
SIGTERM can be handled; in fact many programs handle it by cleaning up their resources, closing files and so on, then exiting. You can write a program to handle SIGTERM in whatever way you desire and then test it by sending it a SIGTERM using the kill command."I'm just a little old lady; don't try to dazzle me with jargon!"


Reply With Quote