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?