Find parent PID of a running process in Linux

When a process is starting sub-processes on a linux system, you would have to stop every single child processes in order to stop them all.

Instead of that, you can easily kill the parent process so it can stop spawning new process.

You can find the parent process with the following command (replace the CHILDPID with your PID):

ps -o ppid= -p $CHILDPID