Commit 58155c104ca for php
commit 58155c104ca5673d98e5560afa8ce93e5ace0cf5
Author: Gina Peter Banyard <girgias@php.net>
Date: Tue Oct 13 21:13:48 2026 +0100
std/file: use bool type for pclose_wait global
diff --git a/ext/standard/file.c b/ext/standard/file.c
index ee6adbe27aa..3f6deca5427 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -871,9 +871,9 @@ PHP_FUNCTION(pclose)
GC_ADDREF(context->res);
}
php_stream_error_operation_begin();
- FG(pclose_wait) = 1;
+ FG(pclose_wait) = true;
zend_list_close(stream->res);
- FG(pclose_wait) = 0;
+ FG(pclose_wait) = false;
php_stream_error_operation_end(context);
if (context) {
zend_list_delete(context->res);
diff --git a/ext/standard/file.h b/ext/standard/file.h
index 08dede7ef9e..68f418d9ef0 100644
--- a/ext/standard/file.h
+++ b/ext/standard/file.h
@@ -94,7 +94,7 @@ typedef struct {
zend_string *user_agent; /* for the http wrapper */
zend_string *from_address; /* for the ftp and http wrappers */
php_stream_context *default_context;
- int pclose_wait;
+ bool pclose_wait;
#ifdef HAVE_GETHOSTBYNAME_R
struct hostent tmp_host_info;
char *tmp_host_buf;
diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c
index 764d5868679..621e61f7a66 100644
--- a/ext/standard/proc_open.c
+++ b/ext/standard/proc_open.c
@@ -385,9 +385,9 @@ PHP_FUNCTION(proc_close)
RETURN_THROWS();
}
- FG(pclose_wait) = 1; /* See comment in `proc_open_rsrc_dtor` */
+ FG(pclose_wait) = true; /* See comment in `proc_open_rsrc_dtor` */
zend_list_close(Z_RES_P(zproc));
- FG(pclose_wait) = 0;
+ FG(pclose_wait) = false;
RETURN_LONG(FG(pclose_ret));
}
/* }}} */