[php-src] master: std/file: use bool type for pclose_wait global

From: Date: Sun, 22 Nov 2026 18:19:00 +0000
Subject: [php-src] master: std/file: use bool type for pclose_wait global
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-144040@lists.php.net to get a copy of this message
Author: Gina Peter Banyard (Girgias) Date: 2026-11-22T18:14:47Z Commit: https://github.com/php/php-src/commit/58155c104ca5673d98e5560afa8ce93e5ace0cf5 Raw diff: https://github.com/php/php-src/commit/58155c104ca5673d98e5560afa8ce93e5ace0cf5.diff std/file: use bool type for pclose_wait global Changed paths: M ext/standard/file.c M ext/standard/file.h M ext/standard/proc_open.c Diff: diff --git a/ext/standard/file.c b/ext/standard/file.c index ee6adbe27aab..3f6deca54277 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 08dede7ef9ee..68f418d9ef0e 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 764d58686791..621e61f7a66d 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)); } /* }}} */

« previous php.cvs (#144040) next »