title: How to kill child processes in Bash?
body: <p>I am trying to do an operation in linux trying to burn cpu using openssl speed</p>
  
  <p>this is my code from netflix simian army</p>
  
  <pre><code>#!/bin/bash
  # Script for BurnCpu Chaos Monkey
  
  cat &lt;&lt; EOF &gt; /tmp/infiniteburn.sh
  #!/bin/bash
  while true;
     do openssl speed;
  done
  EOF
  
  # 32 parallel 100% CPU tasks should hit even the biggest EC2 instances
  for i in {1..32}
  do
    nohup /bin/bash /tmp/infiniteburn.sh &amp;
  done
  </code></pre>
  
  <p>so this is Netflix simian army code to do burn cpu, this executes properly but the issue is I cannot kill all 32 processes, I tried everything</p>
  
  <pre><code>pkill -f pid/process name
  killall -9 pid/process name
  etc.,
  </code></pre>
  
  <p>the only successful way I killed the process is through killing it via user</p>
  
  <pre><code>pkill -u username
  </code></pre>
  
  <p>How can I kill these process without using username?</p>
  
  <p>any help is greatly appreciated</p>