I have a bash script that does some parallel processing in a loop. I don't want the parallel process to spike the CPU, so I use a sleep command. Here's a simplified version.
(while true;do sleep 99999;done)&
+ Terminated ( while true; do
ps aux|grep sleep
PIDbecause it is a process running and just waiting. Try
which sleepto see where it is.
ps -ufto see the process tree on your system. From there you can determine what the
PPID(parent PID) of the shell (the one running the loop) of the sleep is.