You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This only affects extensions which might print to stderr (or stdout)
after request shutdown, so prshutdown, mshutdown, and gshutdown, as
well as the equivalent zend_extension shutdown.
There's no need to close the file handles stin, stdout, and stderr nor
their equivalent file descriptors (unless you dup them, then you need
to close the dup).
I hit this when trying to debug PHP lifecycle issues and nothing after
request shutdown was showing up. In the case of one extension that was
using a Rust library to print colored debug messages, it would panic
because the library didn't expect stderr to actually get closed.
Although the library should be more cautious, there's no need to close
these streams.
There are already two cases where we don't close these files: debug
builds and if --repeat is used.
I already have patches for this, expect to merge them shortly but
wanted to have an issue number to use for the test.
PHP Version
Has been an issue at least as far back as PHP 5.4, still present on PHP 8.1.
Operating System
No response
The text was updated successfully, but these errors were encountered:
It was supposed to be solved by #8569, #8570 and #8571, respectively. However, that had to be reverted due to #8827. And since this ticket number is already listed in the changelog, I'm closing this ticket. Note that there is #8833 which is supposed to provide a proper fix without BC break, but this is highly unlikely to be back-ported to the stable branches. So if the issue at hand needs to addressed in PHP 8.0/8.1, please open a new ticket.
Description
This only affects extensions which might print to stderr (or stdout)
after request shutdown, so prshutdown, mshutdown, and gshutdown, as
well as the equivalent zend_extension shutdown.
There's no need to close the file handles stin, stdout, and stderr nor
their equivalent file descriptors (unless you dup them, then you need
to close the dup).
I hit this when trying to debug PHP lifecycle issues and nothing after
request shutdown was showing up. In the case of one extension that was
using a Rust library to print colored debug messages, it would panic
because the library didn't expect stderr to actually get closed.
Although the library should be more cautious, there's no need to close
these streams.
There are already two cases where we don't close these files: debug
builds and if
--repeat
is used.I already have patches for this, expect to merge them shortly but
wanted to have an issue number to use for the test.
PHP Version
Has been an issue at least as far back as PHP 5.4, still present on PHP 8.1.
Operating System
No response
The text was updated successfully, but these errors were encountered: