[php-src] master: ext/pcntl: pcntl_unshare minor error message clarification (for EINVAL). (#13872)

From: Date: Tue, 02 Apr 2024 22:26:12 +0000
Subject: [php-src] master: ext/pcntl: pcntl_unshare minor error message clarification (for EINVAL). (#13872)
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-127938@lists.php.net to get a copy of this message
Author: David CARLIER (devnexen) Committer: GitHub (web-flow) Pusher: devnexen Date: 2024-04-02T23:26:07+01:00 Commit: https://github.com/php/php-src/commit/7db7c420f1fb30ac205b9e07c929ffa6982e5fd3 Raw diff: https://github.com/php/php-src/commit/7db7c420f1fb30ac205b9e07c929ffa6982e5fd3.diff ext/pcntl: pcntl_unshare minor error message clarification (for EINVAL). (#13872) it is not necessarily a bad flag but can just be unsupported by the current kernel. Changed paths: M ext/pcntl/pcntl.c M ext/pcntl/tests/pcntl_unshare_04.phpt Diff: diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index c3139bfd86981..79b51967f3eaf 100644 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -1262,7 +1262,7 @@ PHP_FUNCTION(pcntl_unshare) switch (errno) { #ifdef EINVAL case EINVAL: - zend_argument_value_error(1, "must be a combination of CLONE_* flags"); + zend_argument_value_error(1, "must be a combination of CLONE_* flags, or at least one flag is unsupported by the kernel"); RETURN_THROWS(); break; #endif diff --git a/ext/pcntl/tests/pcntl_unshare_04.phpt b/ext/pcntl/tests/pcntl_unshare_04.phpt index 6461013177e8e..a8b2f3842781e 100644 --- a/ext/pcntl/tests/pcntl_unshare_04.phpt +++ b/ext/pcntl/tests/pcntl_unshare_04.phpt @@ -23,4 +23,4 @@ try { ?> --EXPECT-- -pcntl_unshare(): Argument #1 ($flags) must be a combination of CLONE_* flags +pcntl_unshare(): Argument #1 ($flags) must be a combination of CLONE_* flags, or at least one flag is unsupported by the kernel

« previous php.cvs (#127938) next »