This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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?