Skip to content

[CLI] Stop closing standard streams (v8.1) - #8570

Closed
morrisonlevi wants to merge 6 commits into
php:PHP-8.1from
morrisonlevi:stop-closing-cli-streams-8.1
Closed

[CLI] Stop closing standard streams (v8.1)#8570
morrisonlevi wants to merge 6 commits into
php:PHP-8.1from
morrisonlevi:stop-closing-cli-streams-8.1

Conversation

@morrisonlevi

Copy link
Copy Markdown
Contributor

Extensions may (and do) write to stderr in mshutdown and similar. In
the best case, with the stderr stream closed, it's just swallowed.

However, some libraries will do things like try to detect color, and
these will outright fail and cause an error path to be taken.

@morrisonlevi
morrisonleviforce-pushed the stop-closing-cli-streams-8.1 branch 3 times, most recently from fec37e1 to 751bfb8CompareMay 16, 2022 23:24
Comment threadsapi/cli/php_cli.c Outdated
@morrisonlevi
morrisonleviforce-pushed the stop-closing-cli-streams-8.1 branch from 751bfb8 to 0f3486eCompareMay 18, 2022 15:38
Extensions may (and do) write to stderr in mshutdown and similar. In
the best case, with the stderr stream closed, it's just swallowed.
However, some libraries will do things like try to detect color, and
these will outright fail and cause an error path to be taken.
@morrisonlevi
morrisonleviforce-pushed the stop-closing-cli-streams-8.1 branch from 0f3486e to 12d1918CompareMay 18, 2022 15:45
Comment threadext/zend_test/tests/gh8575.phpt Outdated
Comment threadext/zend_test/tests/gh8575.phpt Outdated
@morrisonlevimorrisonlevi changed the title Stop closing stderr and stdout streams (v8.1)[CLI] Stop closing standard streams (v8.1)May 19, 2022
arnaud-lb pushed a commit to arnaud-lb/php-src that referenced this pull request May 20, 2022
Extensions may (and do) write to stderr in mshutdown and similar. In
the best case, with the stderr stream closed, it's just swallowed.
However, some libraries will do things like try to detect color, and
these will outright fail and cause an error path to be taken.
arnaud-lb added a commit to arnaud-lb/php-src that referenced this pull request May 20, 2022
* PHP-8.1:
Stop closing stderr and stdout streams (php#8570)
Revert "XFAIL tests (phpGH-8588)"
XFAIL tests (phpGH-8588)
Stop closing stderr and stdout streams (php#8569)
@arnaud-lb

Copy link
Copy Markdown
Member

Merged in ffd27bd

@morrisonlevi
morrisonlevi deleted the stop-closing-cli-streams-8.1 branch May 20, 2022 15:42
dixyes added a commit to dixyes/phpmicro that referenced this pull request Jun 16, 2022
dixyes added a commit to dixyes/phpmicro that referenced this pull request Jun 16, 2022
dixyes added a commit to dixyes/phpmicro that referenced this pull request Jun 16, 2022
adrian-enspired pushed a commit to adrian-enspired/php-src that referenced this pull request Aug 4, 2026
Extensions may (and do) write to stderr in mshutdown and similar. In
the best case, with the stderr stream closed, it's just swallowed.
However, some libraries will do things like try to detect color, and
these will outright fail and cause an error path to be taken.
adrian-enspired pushed a commit to adrian-enspired/php-src that referenced this pull request Aug 4, 2026
* PHP-8.1:
Stop closing stderr and stdout streams (php#8570)
Revert "XFAIL tests (phpGH-8588)"
XFAIL tests (phpGH-8588)
Stop closing stderr and stdout streams (php#8569)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@morrisonlevi@arnaud-lb@cmb69@bwoebi