title: Supervisord action if service restart
body: <p>I want to create a file when the service is restarted. </p>
  
  <pre><code>rpm -qa | grep super
   supervisor-3.1.3-0.5.b1.el6.noarch
  </code></pre>
  
  <p>My config file:</p>
  
  <pre><code>[program:tests]
  command=/root/while.sh
  directory=/root
  user=root
  autostart=true
  autorestart=true
  
  [eventlistener:tests_ls]
  command=touch /tmp/32
  events=PROCESS_STATE
  </code></pre>
  
  <p>My log file error </p>
  
  <pre><code>2016-06-27 10:48:15,794 ERRO pool tests_ls event buffer overflowed, discarding event 8
  2016-06-27 10:48:15,794 INFO exited: tests_ls (exit status 0; not expected)
  2016-06-27 10:48:16,796 ERRO pool tests_ls event buffer overflowed, discarding event 9
  2016-06-27 10:48:16,796 INFO gave up: tests_ls entered FATAL state, too many start retries too quickly
  2016-06-27 10:48:39,155 ERRO pool tests_ls event buffer overflowed, discarding event 10
  2016-06-27 10:48:39,155 INFO exited: tests (terminated by SIGKILL; not expected)
  2016-06-27 10:48:40,157 ERRO pool tests_ls event buffer overflowed, discarding event 11
  2016-06-27 10:48:40,160 INFO spawned: 'tests' with pid 26378
  2016-06-27 10:48:41,163 ERRO pool tests_ls event buffer overflowed, discarding event 12
  
  
  supervisorctl
   tests                            RUNNING   pid 26378, uptime 0:09:02
   tests_ls                         FATAL     Exited too quickly (process log may have details)
  </code></pre>
  
  <p>Where did I go wrong?</p>