title: pcntl_fork zombies on homestead php 7 / nginx
body: <p>I've troubleshooted this every which way and yet can't find out why this problem is happening. I am using pcntl_fork, and pcntl_wait like this:</p>
  
  <pre><code>$pid = pcntl_fork();
  if ($pid == -1) {
       die('could not fork');
  } else if ($pid) {
       // we are the parent
       pcntl_wait($status); //Protect against Zombie children
  } else {
       // we are the child
  }
  </code></pre>
  
  <p>I am able to fork properly. When I look at my processes, the child process remains even after the script has completed. Every time I run this, another fork is created, and is not killed. I have tried posix_kill (returns success code), I have tried pcntl_waitpid(), and no matter what, the process remains running. They do NOT become defunct either. Thanks guys.</p>