- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to kill Parent & Child Process.
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
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
тАО01-14-2011 02:52 AM
тАО01-14-2011 02:52 AM
How to kill Parent & Child Process.
with kill -9 only Parent process is killed and child process becoming orphan..
Please help..
- Tags:
- kill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2011 03:08 AM
тАО01-14-2011 03:08 AM
Re: How to kill Parent & Child Process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2011 04:58 AM - last edited on тАО11-10-2011 09:11 AM by Kevin_Paul
тАО01-14-2011 04:58 AM - last edited on тАО11-10-2011 09:11 AM by Kevin_Paul
Re: How to kill Parent & Child Process.
In case the child are orphan they maybe "zombies" & cant be killed
check with "ps -el|grep Z"
# ps -el|grep Z
# ps -ef|grep defunct
If we have defunct processes we may need to
reboot.
If any process terminates before its children do, init inherits those children. When they die, init calls one of the wait() functions to retrieve the child's termination status, and the child disappears from the process table.
Pleas read this
http://h30499.www3.hp.com/t5/System-Administration/Question-on-defunct-zombie-process-UX/m-p/4004591#M297832
- Tags:
- zombie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2011 05:04 AM
тАО01-14-2011 05:04 AM
Re: How to kill Parent & Child Process.
#!/bin/sh
# killh.sh -killing a process and its child processes
[ $# -eq 1 ] || return 0
UNIX95= ps -e -o ppid,pid | awk '{if ('"$1"'==$1) print $2}' | xargs -t -n 1 ./killh.sh
kill -9 $1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2011 12:33 AM
тАО01-15-2011 12:33 AM
Re: How to kill Parent & Child Process.
You need to be very careful about running a script like this. :-)
Add "echo" in front of that kill -9 until you are happy.
Also, you may want a normal kill before you try -9.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2011 08:46 AM
тАО01-16-2011 08:46 AM
Re: How to kill Parent & Child Process.
Using a 'kill -9' doesn't give a process a chance to catch the signal and cleanup. That is, there is no way for the process to remove any temporary files or shared memory segments. It is for this reason, as Dennis hinted, that you should try a "kinder" 'kill' first, using a 'kill -9' only if the process won't die. Even with a 'kill -9' a process that is waiting on a kernel event (such as an I/O completion) will not die until the higher event is satisfied.
Regards!
...JRF...