Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ PHP 8.7 UPGRADE NOTES
- Core:
. Block declaration support for the encoding declare has been removed as it
did not function properly.
. Zend Signals has been removed, along with the --disable-zend-signals
configure option and the "Zend Signal Handling" phpinfo() entry. Signals
are no longer deferred while the engine runs, including while OPcache
writes to shared memory. pcntl_signal() handlers are replaced at request
shutdown by the handler installed before the request, instead of SIG_DFL.

- Curl:
. curl_multi_exec() now throws a TypeError when $still_running cannot be
Expand Down Expand Up @@ -184,6 +189,9 @@ PHP 8.7 UPGRADE NOTES
11. Changes to INI File Handling
========================================

- Core:
. The zend.signal_check INI setting has been removed.

- Opcache:
. opcache.max_accelerated_files now defaults to 16229 (previously 10000),
accepts values up to 1048793 (previously 1000000), and logs a warning for
Expand Down
8 changes: 8 additions & 0 deletions UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ PHP 8.7 INTERNALS UPGRADE NOTES
========================

- Breaking changes:
. Zend Signals has been removed, along with Zend/zend_signal.h. ZEND_SIGNALS,
SIGG(), zend_signal_globals_t, HANDLE_BLOCK_INTERRUPTIONS(),
HANDLE_UNBLOCK_INTERRUPTIONS(), ZEND_SIGNAL_BLOCK_INTERRUPTIONS(),
ZEND_SIGNAL_UNBLOCK_INTERRUPTIONS(), zend_signal_startup(),
zend_signal_init(), zend_signal_activate(), zend_signal_deactivate(),
zend_signal() and zend_sigaction() no longer exist. Use signal() and
sigaction() directly.
. Added zend_module_entry.child_init_func, an optional void callback invoked
by php_child_init() in the child process after core child initialization.
It runs in module dependency order for started modules and may run before a
Expand Down Expand Up @@ -116,6 +123,7 @@ PHP 8.7 INTERNALS UPGRADE NOTES

- Unix build system changes:
. Autoconf minimum required version upgraded to 2.71.
. The --disable-zend-signals configure option has been removed.

========================
3. Module changes
Expand Down
23 changes: 0 additions & 23 deletions Zend/Zend.m4
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ AX_CHECK_COMPILE_FLAG([-fno-common],
[CFLAGS="-fno-common $CFLAGS"])

ZEND_CHECK_ALIGNMENT
ZEND_CHECK_SIGNALS
ZEND_CHECK_MAX_EXECUTION_TIMERS
])

Expand Down Expand Up @@ -435,28 +434,6 @@ AS_VAR_IF([php_cv_align_mm], [failed],
])
])

dnl
dnl ZEND_CHECK_SIGNALS
dnl
dnl Check whether to enable Zend signal handling if supported by the system.
dnl
AC_DEFUN([ZEND_CHECK_SIGNALS], [dnl
AC_ARG_ENABLE([zend-signals],
[AS_HELP_STRING([--disable-zend-signals],
[Disable Zend signal handling])],
[ZEND_SIGNALS=$enableval],
[ZEND_SIGNALS=yes])

AC_CHECK_FUNCS([sigaction],, [ZEND_SIGNALS=no])
AS_VAR_IF([ZEND_SIGNALS], [yes],
[AC_DEFINE([ZEND_SIGNALS], [1],
[Define to 1 if Zend signal handling is supported and enabled.])
AS_VAR_APPEND([CFLAGS], [" -DZEND_SIGNALS"])])

AC_MSG_CHECKING([whether to enable Zend signal handling])
AC_MSG_RESULT([$ZEND_SIGNALS])
])

dnl
dnl ZEND_CHECK_MAX_EXECUTION_TIMERS
dnl
Expand Down
9 changes: 0 additions & 9 deletions Zend/zend.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,6 @@ static ZEND_INI_MH(OnUpdateFiberStackSize) /* {{{ */
}
/* }}} */

#if ZEND_DEBUG
# define SIGNAL_CHECK_DEFAULT "1"
#else
# define SIGNAL_CHECK_DEFAULT "0"
#endif

ZEND_INI_BEGIN()
ZEND_INI_ENTRY("error_reporting", NULL, ZEND_INI_ALL, OnUpdateErrorReporting)
STD_ZEND_INI_BOOLEAN("fatal_error_backtraces", "1", ZEND_INI_ALL, OnUpdateBool, fatal_error_backtrace_on, zend_executor_globals, executor_globals)
Expand All @@ -271,9 +265,6 @@ ZEND_INI_BEGIN()
STD_ZEND_INI_BOOLEAN("zend.multibyte", "0", ZEND_INI_PERDIR, OnUpdateBool, multibyte, zend_compiler_globals, compiler_globals)
ZEND_INI_ENTRY("zend.script_encoding", NULL, ZEND_INI_ALL, OnUpdateScriptEncoding)
STD_ZEND_INI_BOOLEAN("zend.detect_unicode", "1", ZEND_INI_ALL, OnUpdateBool, detect_unicode, zend_compiler_globals, compiler_globals)
#ifdef ZEND_SIGNALS
STD_ZEND_INI_BOOLEAN("zend.signal_check", SIGNAL_CHECK_DEFAULT, ZEND_INI_SYSTEM, OnUpdateBool, check, zend_signal_globals_t, zend_signal_globals)
#endif
STD_ZEND_INI_BOOLEAN("zend.exception_ignore_args", "0", ZEND_INI_ALL, OnUpdateBool, exception_ignore_args, zend_executor_globals, executor_globals)
STD_ZEND_INI_ENTRY("zend.exception_string_param_max_len", "15", ZEND_INI_ALL, OnSetExceptionStringParamMaxLen, exception_string_param_max_len, zend_executor_globals, executor_globals)
STD_ZEND_INI_ENTRY("fiber.stack_size", NULL, ZEND_INI_ALL, OnUpdateFiberStackSize, fiber_stack_size, zend_executor_globals, executor_globals)
Expand Down
4 changes: 0 additions & 4 deletions Zend/zend.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,10 @@
#include "zend_stream.h"
#include "zend_smart_str_public.h"
#include "zend_smart_string_public.h"
#include "zend_signal.h"
#include "zend_max_execution_timer.h"

#define zend_sprintf sprintf

#define HANDLE_BLOCK_INTERRUPTIONS() ZEND_SIGNAL_BLOCK_INTERRUPTIONS()
#define HANDLE_UNBLOCK_INTERRUPTIONS() ZEND_SIGNAL_UNBLOCK_INTERRUPTIONS()

#define INTERNAL_FUNCTION_PARAMETERS zend_execute_data *execute_data, zval *return_value
#define INTERNAL_FUNCTION_PARAM_PASSTHRU execute_data, return_value

Expand Down
10 changes: 3 additions & 7 deletions Zend/zend_execute_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -1694,24 +1694,20 @@ static void zend_set_timeout_ex(zend_long seconds, bool reset_signals) /* {{{ */
# endif

if (reset_signals) {
# ifdef ZEND_SIGNALS
zend_signal(signo, zend_timeout_handler);
# else
sigset_t sigset;
# ifdef HAVE_SIGACTION
# ifdef HAVE_SIGACTION
struct sigaction act;

act.sa_handler = zend_timeout_handler;
sigemptyset(&act.sa_mask);
act.sa_flags = SA_ONSTACK | SA_RESETHAND | SA_NODEFER;
sigaction(signo, &act, NULL);
# else
# else
signal(signo, zend_timeout_handler);
# endif /* HAVE_SIGACTION */
# endif /* HAVE_SIGACTION */
sigemptyset(&sigset);
sigaddset(&sigset, signo);
sigprocmask(SIG_UNBLOCK, &sigset, NULL);
# endif /* ZEND_SIGNALS */
}
}
#endif /* HAVE_SETITIMER */
Expand Down
Loading
Loading