kill command

Good way to kill the process, if the process having it's child

#!/bin/sh
echo "Enter the parent process ID"
read ppid
for i in `ps -ef| awk '$3 == '${ppid}' { print $2 }'`
do
echo killing $i
kill -9 $i
done

This script will help you to kill the child process

You can simply kill the process. Try it,

kill -9 -<process_id>

kill -9 -<process id> # remember the - before the process id

remember you cannot give more than one process id in this command