title: supervisord stopping child processes
body: <p>One of the problems, I face with supervisord is that when I have a command which in turn spawns another process, supervisord is not able to kill it. </p>
  
  <p>For example I have a java process which when runs normally is like</p>
  
  <pre><code> $ zkServer.sh start-foreground
   $ ps -eaf | grep zk
   user 30404 28280  0 09:21 pts/2    00:00:00 bash zkServer.sh start-foreground
   user 30413 30404 76 09:21 pts/2    00:00:10 java -Dzookeeper.something..something
  </code></pre>
  
  <p>The supervisord config file looks like:</p>
  
  <pre><code>[program:zookeeper]
  command=zkServer.sh start-foreground
  autorestart=true
  stopsignal=KILL
  </code></pre>
  
  <p>These kind of processes which have multiple childs are not well handled by supervisord when it comes to stopping them from <code>supervisorctl</code>. So when I run this from the supervisord and try to stop it from supervisorctl, only the top level process gets killed but not the actual java process.</p>