Hello,
When you create process with proc_open() (or popen()) you'll get a
process-resource. The destructor of this resource calls waitpid() (or
it's Windows-equivalent) and waits for the childprocess to die.
I think it is very counter-intuïtive that when you derefence the
resource it will wait, possibly forever, for the process to exit. This
also makes it hard to start a process which should outlive the current
process.
To maintain BC and give users a way to wait for the process I think
proc_close() should still wait for the process, but in case the resource
gets dereferenced I would like to change the behaviour.
I doubt anyone is relying on the current behaviour if they don't call
proc_close().
An implementation is quite simple:
https://github.com/Jille/php-src/commit/31a1aa384c29487e077ccf3fd067eca188cf1201
-- Jille
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php