- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Kill command
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2001 07:49 PM
тАО11-15-2001 07:49 PM
I have questions on kill command. When shall we use # kill -9 PID and
# kill PID?
Why we face problem if we # kill -9 automount?
I've gone through the manpage it mentions signal 9 can't be trapped and signal 15 can be trapped. May I know what does it mean?
Thanks in advanced.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2001 07:52 PM
тАО11-15-2001 07:52 PM
Re: Kill command
Kill -9 is a slaughter and Kill -15 is gracefull Kill.
If kill with other option doesn't work kill -9.
-USA..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2001 08:35 PM
тАО11-15-2001 08:35 PM
Re: Kill command
But signal 9 cannot be trapped - as soon as a process gets signal 9, it exits pronto. What is called an 'ungraceful exit'.
see man signal for details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2001 08:39 PM
тАО11-15-2001 08:39 PM
Re: Kill command
Have a look at the the link below.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,11866,0xf396abe92dabd5118ff10090279cd0f9,00.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2001 08:41 PM
тАО11-15-2001 08:41 PM
Re: Kill command
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2001 08:41 PM
тАО11-15-2001 08:41 PM
Re: Kill command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2001 08:56 PM
тАО11-15-2001 08:56 PM
SolutionKill sends a signal to the process id specified in the argument.
eg: kill
By default kill sends the signal 15 to the pid.
which is actually kill -15
Signal 15 is a software termination signal which asks the process to terminate gracefully, if possible. That is why you see sometimes, the processes like automount do not get killed by signal 15, since 15 is not a compulsive kill signal.
Some common signals which are defined internally in Unix and used are :
Signal 2 -> Terminal interrupt (control-C)
signal 3 -> create core image and quit
Signal 9 -> kill
Signal 15 -> software termination
Since kill 9 is a definite kill signal to the process, the process tries to terminate immediately but can hang since it could be waiting for I/O to end and does not have control to quit it.
<>
The best analogy can be, if your boss summons, you cannot ignore him and have to respond to it immediately, that makes your boss a Signal 9. Whereas the rest of whom you can ignore or put in the backburner become signal 15 ;-)
Another example:
***
trap 'echo You sent me signal2 but i will not exit hhaaa haaa' 2
while (true)
do
echo 'program running'
done
***
When you run this progam and press control-C
it will give the message -you sent me a signal2-; , but will not exit.
But you cannot do the same to a signal 9. i.e
it cannot be "trapped". It is the boss.
-raj (remembering some old unix lessons).