It is worth noting that proc_get_status will continue to indicate the process that you spawned is running (because it is!) until that process has been able to write everything it wants to write to the STDOUT and STDERR streams.
PHP seems to use a buffer for this and so the spawned process can can get it's write calls to return immediately.
However, once this buffer is full the write call will block until you read out some of the information from the stream/pipe.
This can manifest itself in many ways but generally the called process will still be running, but just not doing anything as it is blocking on being able to write more to STDERR or STDOUT -- whichever stream buffer is full.
To work around this you should include in your loop of checking proc_get_status' running element a "stream_get_contents" on the relevant pipes.
I generally use stream_set_blocking($pipies[2], 0) kind of calls to make sure that the stream_get_contents call will not block if there is no data in the stream.
This one had me stumped for a while, so hopefully it helps someone!