Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed

Conversation

morrisonlevi
Copy link
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 morrisonlevi force-pushed the stop-closing-cli-streams-8.1 branch 3 times, most recently from fec37e1 to 751bfb8 Compare May 16, 2022 23:24
sapi/cli/php_cli.c Outdated Show resolved Hide resolved
@morrisonlevi morrisonlevi force-pushed the stop-closing-cli-streams-8.1 branch from 751bfb8 to 0f3486e Compare May 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 morrisonlevi force-pushed the stop-closing-cli-streams-8.1 branch from 0f3486e to 12d1918 Compare May 18, 2022 15:45
@morrisonlevi morrisonlevi 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
Member

Merged in ffd27bd

@arnaud-lb arnaud-lb closed this May 20, 2022
@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
Sign up for free to 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