When we need to call the c/c++ program, it is JNA/JNI that we need to complete.
You can kill the progresses, parent, children and grandchildren which are of the same PGID
PGID=`ps j -A | grep 'xxxxx' | grep -v 'grep' | awk '{print $3}'`
# safety kill application which could hook the sign to deal something
kill -SIGTERM -- -${PGID}
# just kill all the progresses
kill -9 -${pid}