Saturday, 8 August 2015

Usage of Linux Signal handler

Definition 
• A signal is an asynchronous event which is delivered to a process. 
• Asynchronous means that the event can occur at any time 
- may be unrelated to the execution of the process 
- E.g. user types ctrl-C or the modem hangs
Name Description Default Action 
SIGINT Interrupt character typed terminate process 
SIGQUIT Quit character typed (^\) create core image 
SIGKILL kill -9 terminate process 
SIGSEGV Invalid memory reference create core image 
SIGPIPE Write on pipe but no reader terminate process 
SIGALRM alarm() clock ‘rings’ terminate process 
SIGUSR1 user-defined signal type terminate process 
SIGUSR2 user-defined signal type terminate process
Generating a Signal 
• Use the UNIX command: 
$ kill -KILL 4481 
– send a SIGKILL signal to pid 4481 
– check 
? ps –l 
– to make sure process died 
• kill is not a good name; send....
Please look more at below link...
http://www.epistemesoft.com/Ariticle%20more.aspx…

1 comment: