I am running a bash script as a background job. The bash script calls a time-consuming executable. If I am not wrong, the running of the bash script is the parent process and the running of the executable is the child process.
I now want to stop the whole running by killing the parent process which is the background job
kill -9 $(jobs -p)
The terminal shows that the running of the bash script is killed. But the running of the executable still hangs on the output of top. I just wonder how to also kill the child process?
Thanks and regards!