Skip to content

Commit

Permalink
ext/pcntl: pcntl_unshare minor error message clarification (for EINVA…
Browse files Browse the repository at this point in the history
…L). (php#13872)

it is not necessarily a bad flag but can just be unsupported by the
current kernel.
  • Loading branch information
devnexen authored Apr 2, 2024
1 parent 04e0d80 commit 7db7c42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ext/pcntl/pcntl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ext/pcntl/tests/pcntl_unshare_04.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7db7c42

Please sign in to comment.