wood burning stoves 2.0*
The moose likes Java in General and the fly likes How to detect parent process is killed? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to detect parent process is killed? " Watch "How to detect parent process is killed? " New topic

How to detect parent process is killed?

jason williams

Joined: Nov 17, 2004
Posts: 14
I have a process which spawned a child process performing some tasks. But a problem happens when parent process is killed (by calling e.g. kill <pid>), the child process becomes an orphan. I test to use jps checking if parent process still exists or not, but it doesn't take effect. How would be the right way to check if parent process is killed and stop child process?


Greg Brannon

Joined: Oct 24, 2010
Posts: 557
Why, under what circumstances, is the parent process being killed?

Learning Java using Eclipse on OpenSUSE 11.2
Linux user#: 501795
I agree. Here's the link: http://aspose.com/file-tools
subject: How to detect parent process is killed?
Similar Threads
stop parent process
how to invoke a system call in java
aboue Runtime.getRuntime().exec() create process
identifying and killing child processes??
about Runtime.getRuntime().exec(shellCmd) create process