title: Supervisord "exit status 1 not expected" running php script
body: <p>I'm having issue try to configure supervisor to run a php script. Running supervisor in debug mode gives me this:</p>
  
  <pre><code>2015-03-09 08:53:06,342 INFO supervisord started with pid 2030
  2015-03-09 08:53:06,358 INFO spawned: 'worker1' with pid 2031
  2015-03-09 08:53:06,423 INFO exited: worker1 (exit status 1; not expected)
  2015-03-09 08:53:06,424 INFO received SIGCLD indicating a child quit
  2015-03-09 08:53:07,440 INFO spawned: 'worker1' with pid 2032
  2015-03-09 08:53:07,587 INFO exited: worker1 (exit status 1; not expected)
  2015-03-09 08:53:07,589 INFO received SIGCLD indicating a child quit
  2015-03-09 08:53:09,604 INFO spawned: 'worker1' with pid 2033
  2015-03-09 08:53:09,756 INFO exited: worker1 (exit status 1; not expected)
  2015-03-09 08:53:09,758 INFO received SIGCLD indicating a child quit
  2015-03-09 08:53:12,775 INFO spawned: 'worker1' with pid 2034
  2015-03-09 08:53:12,973 INFO exited: worker1 (exit status 1; not expected)
  2015-03-09 08:53:12,974 INFO received SIGCLD indicating a child quit
  2015-03-09 08:53:13,976 INFO gave up: worker1 entered FATAL state, too many start retries too quickly
  </code></pre>
  
  <p>The supervisord configuration:</p>
  
  <pre><code>[program:worker1]
  command=php myScript.php
  directory=/home/path/to/script/
  user=root
  autostart=true
  autorestart=true
  stderr_logfile=/var/log/worker1.err.log
  stdout_logfile=/var/log/worker1.out.log
  redirect_stderr=true
  environment=PATH="/usr/bin"
  </code></pre>
  
  <p>For this test myScript.php just print out <code>echo "test".PHP_EOL;</code></p>
  
  <p>There are no logs reporting errors from php, and if I run the script thru cli it works as expected. The supervisord log just report the same output as debuggin.</p>
  
  <p>I've also tried using absolute paths like <code>/usr/bin/php /home/path/to/script/myScript.php</code> but nothing changes.</p>
  
  <p>File permission for myScript.php are set to <code>-rwxrwxr-x 1 root apache</code></p>
  
  <p>Really don't know what else i could check. Thanks for support!</p>
  
  <p><strong>UPDATE_1</strong></p>
  
  <p>I've also tried to monitor other program like /bin/cat or a bash script and works like a charm. The problem seems to be limited to php.</p>
  
  <p><strong>UPDATE_2</strong></p>
  
  <p>As N.B. pointed out in the comments i've changed the test script to look more like long-running-job:</p>
  
  <pre><code>while(true){
      echo "test".PHP_EOL;
      sleep(10);
  }
  </code></pre>
  
  <p>Same as before, it enters in FATAL state.</p>