LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-03-2013, 01:27 AM   #1
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 539

Rep: Reputation: 33
What is 'kill -15' ?


Till now I konw kill -9. But how is 'kill -15'?
 
Old 07-03-2013, 01:34 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Code:
kill -l
 1) SIGHUP	 2) SIGINT	 3) SIGQUIT	 4) SIGILL	 5) SIGTRAP
 6) SIGABRT	 7) SIGBUS	 8) SIGFPE	 9) SIGKILL	10) SIGUSR1
11) SIGSEGV	12) SIGUSR2	13) SIGPIPE	14) SIGALRM	15) SIGTERM
16) SIGSTKFLT	17) SIGCHLD	18) SIGCONT	19) SIGSTOP	20) SIGTSTP
21) SIGTTIN	22) SIGTTOU	23) SIGURG	24) SIGXCPU	25) SIGXFSZ
26) SIGVTALRM	27) SIGPROF	28) SIGWINCH	29) SIGIO	30) SIGPWR
31) SIGSYS	34) SIGRTMIN	35) SIGRTMIN+1	36) SIGRTMIN+2	37) SIGRTMIN+3
38) SIGRTMIN+4	39) SIGRTMIN+5	40) SIGRTMIN+6	41) SIGRTMIN+7	42) SIGRTMIN+8
43) SIGRTMIN+9	44) SIGRTMIN+10	45) SIGRTMIN+11	46) SIGRTMIN+12	47) SIGRTMIN+13
48) SIGRTMIN+14	49) SIGRTMIN+15	50) SIGRTMAX-14	51) SIGRTMAX-13	52) SIGRTMAX-12
53) SIGRTMAX-11	54) SIGRTMAX-10	55) SIGRTMAX-9	56) SIGRTMAX-8	57) SIGRTMAX-7
58) SIGRTMAX-6	59) SIGRTMAX-5	60) SIGRTMAX-4	61) SIGRTMAX-3	62) SIGRTMAX-2
63) SIGRTMAX-1	64) SIGRTMAX
http://linux.die.net/man/1/kill
 
1 members found this post helpful.
Old 07-03-2013, 04:06 PM   #3
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
The problem is though that that just lists the names. It doesn't actually explain anything about what they do. And frankly I don't quite know the answer either. I've never found anything that definitively explains what all those listed signals are supposed to do.

I do know that SIGKILL is considered the sledgehammer of process destruction, immediately terminating it without any cleanup whatsoever. It can trash filesystems, corrupt files, and do other damage, so most net advice says to never* use it.

SIGTERM, OTOH, is a much more gentle signal that gives the process a chance to clean up and terminate properly. It's the one you generally should be using first when trying to stop a misbehaving process.



*In my experience though, I can't see how that's really possible. When you have a process that isn't responding to anything, and you have to stop it somehow, what else is there to use?
 
Old 07-03-2013, 09:06 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Yeah, you have to google around a bit to find them.
This explains the most commonly used ones http://linuxandfriends.com/linux-signals/ and the signal man page goes into a few.
Some programming sites provide a bit of detail eg http://www.comptechdoc.org/os/linux/...pgsignals.html
 
Old 07-03-2013, 09:24 PM   #5
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,344

Rep: Reputation: Disabled
Quote:
Originally Posted by David the H. View Post
I do know that SIGKILL is considered the sledgehammer of process destruction, immediately terminating it without any cleanup whatsoever. It can trash filesystems, corrupt files, and do other damage, so most net advice says to never* use it.
In short, there are two types of signals. One type is the non-catchable signal like SIGKILL and SIGSTOP; the other type, catchable, covers the rest.

When a process receives a signal, the signal handler (if one exists within the process) is invoked. The process can choose to do something in response to the signal, or it can just ignore it. The various signal types indicate what a process is supposed to do when it receives a certain signal, but whether a given process actually follows these guidelines is quite another matter.

SIGKILL and SIGSTOP are handled by the OS (I believe they are the only ones, but I could be wrong) and cannot be "caught" by a signal handler. SIGKILL terminates the process and frees any memory it was using, while SIGSTOP stops/pauses the process until a SIGCONT is sent.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to kill a process in Linux - kill, killall, pkill, xkill LXer Syndicated Linux News 0 04-02-2013 12:01 PM
What if 'kill -9' fails to kill a task? chii-chan Linux - Newbie 15 03-27-2013 03:47 PM
Unable to kill process with kill -9 pgb205 Linux - Software 5 01-13-2011 03:55 PM
[SOLVED] Kill a hung task when kill -9 doesn't help 10110111 Linux - General 4 04-02-2009 11:10 AM
how to use kill to kill a batch of processes with same name? dr_zayus69 Linux - Software 2 09-03-2005 06:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration