|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 7.4.0RC4
+- Pcntl:
+ . Fixed bug #77335 (PHP is preventing SIGALRM from specifying SA_RESTART).
+ (Nikita)
+
- SimpleXML:
. Fixed bug #75245 (Don't set content of elements with only whitespaces).
(eriklundin)
function does not throw, so explicitly checking it is not necessary.
RFC: http://php.net/manual/de/function.openssl-random-pseudo-bytes.php
+- Pcntl:
+ . The $restart_syscalls flag for pcntl_signal() will now be respected for
+ SIGALARM. Previously it was hardcoded to false. To reduce the backwards
+ compatibility impact, the default for SIGALARM will remain false however.
+
- PCRE:
. When PREG_UNMATCHED_AS_NULL mode is used, trailing unmatched capturing
groups will now also be set to null (or [null, -1] if offset capture is
zval *handle;
zend_long signo;
zend_bool restart_syscalls = 1;
+ zend_bool restart_syscalls_is_null = 1;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "lz|b", &signo, &handle, &restart_syscalls) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "lz|b!", &signo, &handle, &restart_syscalls, &restart_syscalls_is_null) == FAILURE) {
return;
}
}
}
+ /* If restart_syscalls was not explicitly specified and the signal is SIGALRM, then default
+ * restart_syscalls to false. PHP used to enforce that restart_syscalls is false for SIGALRM,
+ * so we keep this differing default to reduce the degree of BC breakage. */
+ if (restart_syscalls_is_null && signo == SIGALRM) {
+ restart_syscalls = 0;
+ }
+
/* Special long value case for SIG_DFL and SIG_IGN */
if (Z_TYPE_P(handle) == IS_LONG) {
if (Z_LVAL_P(handle) != (zend_long) SIG_DFL && Z_LVAL_P(handle) != (zend_long) SIG_IGN) {
#ifdef HAVE_STRUCT_SIGINFO_T
act.sa_flags |= SA_SIGINFO;
#endif
- if (signo == SIGALRM || (! restart)) {
+ if (!restart) {
#ifdef SA_INTERRUPT
act.sa_flags |= SA_INTERRUPT; /* SunOS */
#endif