Skip to content

Commit 5cda41e

Browse files
committed
Nit
1 parent a55cd85 commit 5cda41e

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

UPGRADING

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,22 @@ PHP 8.4 UPGRADE NOTES
1919
1. Backward Incompatible Changes
2020
========================================
2121

22+
- PCNTL:
23+
. The functions pcntl_sigprocmask(), pcntl_sigwaitinfo() and
24+
pcntl_sigtimedwait() now throw:
25+
- A ValueError if the $signals array is empty (except for
26+
pcntl_sigprocmask() if the $mode is SIG_SETMASK).
27+
- A TypeError if a value of the $signals array is not an integer
28+
- A ValueError if a value of the $signals array is not a valid signal number
29+
Moreover, those functions now always return false on failure.
30+
In some case previously it could return the value -1.
31+
. The function pcntl_sigprocmask() will also now throw:
32+
- A ValueError if $mode is not one of SIG_BLOCK, SIG_UNBLOCK, or SIG_SETMASK
33+
. The function pcntl_sigtimedwait() will also now throw:
34+
- A ValueError if $seconds is less than 0
35+
- A ValueError if $nanoseconds is less than 0 or greater than 1e9
36+
- A ValueError if both $seconds and $nanoseconds are 0
37+
2238
========================================
2339
2. New Features
2440
========================================

ext/pcntl/pcntl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ PHP_FUNCTION(pcntl_sigtimedwait)
901901
RETURN_THROWS();
902902
}
903903
/* Nanosecond between 0 and 1e9 */
904-
if (tv_nsec < 0 || tv_nsec > 1000000000) {
904+
if (tv_nsec < 0 || tv_nsec >= 1000000000) {
905905
zend_argument_value_error(4, "must be between 0 and 1e9");
906906
RETURN_THROWS();
907907
}

0 commit comments

Comments
 (0)