[packages/php-pecl-expect] And fix behaviour change between php 7.3 and 7.4 (php-src commit d59aac58b3e7).
arekm
arekm at pld-linux.org
Thu Feb 19 22:10:31 CET 2026
commit 026ef843b4fb75e178bbc0a8870a2803998c833a
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Feb 19 22:10:26 2026 +0100
And fix behaviour change between php 7.3 and 7.4 (php-src commit d59aac58b3e7).
build.patch | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
---
diff --git a/build.patch b/build.patch
index bb4b061..b85ce3b 100644
--- a/build.patch
+++ b/build.patch
@@ -209,3 +209,30 @@ index a8ce93d..856ff85 100644
PHP_MINFO_FUNCTION(expect);
PHP_FUNCTION(expect_popen);
+diff --git a/expect.c b/expect.c
+index 405fd53..929337a 100644
+--- a/expect.c
++++ b/expect.c
+@@ -319,6 +319,8 @@ PHP_FUNCTION(expect_popen)
+ }
+
+ stream->flags |= PHP_STREAM_FLAG_NO_SEEK;
++ /* PTY reads may return EIO when the child exits; suppress notices (PHP 7.4+ d59aac58b3e7). */
++ stream->flags |= PHP_STREAM_FLAG_SUPPRESS_ERRORS;
+
+ #if PHP_MAJOR_VERSION >= 7
+ ZVAL_LONG (&z_pid, exp_pid);
+diff --git a/expect_fopen_wrapper.c b/expect_fopen_wrapper.c
+index 0ed83f4..56bb518 100644
+--- a/expect_fopen_wrapper.c
++++ b/expect_fopen_wrapper.c
+@@ -45,6 +45,9 @@ php_stream *php_expect_stream_open (php_stream_wrapper *wrapper, char *command,
+ if ((fp = exp_popen(command)) != NULL) {
+ #endif
+ php_stream* stream = php_stream_fopen_from_pipe (fp, mode);
++ stream->flags |= PHP_STREAM_FLAG_NO_SEEK;
++ /* PTY reads may return EIO when the child exits; suppress notices (PHP 7.4+ d59aac58b3e7). */
++ stream->flags |= PHP_STREAM_FLAG_SUPPRESS_ERRORS;
+ #if PHP_MAJOR_VERSION >= 7
+ zval z_pid;
+ ZVAL_LONG (&z_pid, exp_pid);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-expect.git/commitdiff/026ef843b4fb75e178bbc0a8870a2803998c833a
More information about the pld-cvs-commit
mailing list