pcntl: fix the reference pages and document the 8.4 failure return - #5767
Open
lacatoire wants to merge 1 commit into
Open
pcntl: fix the reference pages and document the 8.4 failure return#5767lacatoire wants to merge 1 commit into
lacatoire wants to merge 1 commit into
Conversation
- pcntl_exec(): it only returns false on failure; on success the process image is replaced and the function does not return. - pcntl_unshare(): it returns a bool, not 0 or -1. - pcntl_sigprocmask(), pcntl_sigtimedwait(), pcntl_sigwaitinfo(): the parameter is named signals, and the thrown classes are marked up as exceptionname. - pcntl_sigtimedwait(), pcntl_sigwaitinfo(): document that failure now returns false, where -1 could be returned before PHP 8.4.0. - pcntl_sigprocmask(): an empty signals array is accepted when mode is SIG_SETMASK. - pcntl_sigtimedwait(): nanoseconds must be between 0 and 1e9, not merely non-negative. - versions.xml: add pcntl_forkx, pcntl_getcpu, pcntl_setns and pcntl_wifcontinued. - constants.xml: drop SI_MSGGQ, which does not exist; the constant is SI_MESGQ and is already documented. - move the seealso simplelists out of their para.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes several inaccuracies on the pcntl reference pages and documents the PHP 8.4.0 failure return.
pcntl_exec()returnsfalseonly on failure; on success the process image is replaced and the function does not return.pcntl_unshare()returns abool, not0/-1.pcntl_sigprocmask(),pcntl_sigtimedwait(),pcntl_sigwaitinfo(): the changelog rows named asignalparameter that does not exist (it issignals), and used<classname>for thrown exceptions.pcntl_sigtimedwait()andpcntl_sigwaitinfo(); an emptysignalsdoes not throw whenmodeisSIG_SETMASK;nanosecondsmust be between0and1e9, not merely non-negative.versions.xml:pcntl_forkx(8.2.0),pcntl_getcpu(8.4.0),pcntl_setns(8.4.0) andpcntl_wifcontinued(7.0.0) were missing.constants.xml:SI_MSGGQdoes not exist in php-src; the constant isSI_MESGQ, documented just above.seealsosimplelists move out of their<para>.Sources
SIG_SETMASKexception, and the new functions.ext/pcntl/pcntl.stub.phpfor signatures, parameter names and per-tag availability;SI_MESGQinpcntl_arginfo.h, noSI_MSGGQanywhere.php:8.4-cliwith pcntl built in:pcntl_sigprocmask(SIG_SETMASK, [])returnstruewithout throwing, andpcntl_sigtimedwait([SIGTERM], $i, 0, 2e9)throwsValueError: Argument #4 ($nanoseconds) must be between 0 and 1e9.