Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Kill child process without killing parent process

807567Jan 8 2009 — edited Jan 15 2009
I had a java process that executed a perl script. The perl script was a child process. How can I kill the perl script and avoid automatically killing the java app?
1: root@TestHost4:/ >ptree 9797
2: 7     /lib/svc/bin/svc.startd
3:   9797  java -jar <PathToJarFile> run
4:     10005 /opt/bin/perl -w <PathToPerlScript>
5: root@TestHost4:/ >kill 10005
6: root@TestHost4:/ >ptree 9797
7: root@TestHost4:/ >
The perl script (line 4) is a child of the java app (line 3). When I kill the script (line 5) I end up also killing the java app (line 6)

How can I kill the child but not the parent?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 12 2009
Added on Jan 8 2009
8 comments
1,485 views