Link to home
Start Free TrialLog in
Avatar of yongsing
yongsing

asked on

What does this kill command do?

Can someone tell me what the following command does?

kill -3 12781 11537
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of yongsing
yongsing

ASKER

I don't have access to a UNIX box right now. I checked the Internet, and I can't find what the "-3" in the command line mean.
-3 means SIGQUIT
 1) SIGHUP       2) SIGINT       3) SIGQUIT      4) SIGILL
 5) SIGTRAP      6) SIGABRT      7) SIGEMT       8) SIGFPE
 9) SIGKILL     10) SIGBUS      11) SIGSEGV     12) SIGSYS
13) SIGPIPE     14) SIGALRM     15) SIGTERM  
So what does the SIGQUIT signal do?

We have a script that do a thread dump of the processes. The kill command was taken from the script.
It depends what handler the process has set for that signal.
If the process has not set a handler, the default action is to dump core and quit the program.
Apart from SIGKILL, how the process handles all the other signals is entirely up to the process itself.

Some common behaviours are:

SIGHUP - used to restart a process, eg: a configuration file has changed and needs to be reread.
SIGQUIT - Dump core or debug file.
Thanks guys!