Skip to content

Commit 7db7c42

Browse files
authored
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.
1 parent 04e0d80 commit 7db7c42

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ext/pcntl/pcntl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,7 @@ PHP_FUNCTION(pcntl_unshare)
12621262
switch (errno) {
12631263
#ifdef EINVAL
12641264
case EINVAL:
1265-
zend_argument_value_error(1, "must be a combination of CLONE_* flags");
1265+
zend_argument_value_error(1, "must be a combination of CLONE_* flags, or at least one flag is unsupported by the kernel");
12661266
RETURN_THROWS();
12671267
break;
12681268
#endif

ext/pcntl/tests/pcntl_unshare_04.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ try {
2323

2424
?>
2525
--EXPECT--
26-
pcntl_unshare(): Argument #1 ($flags) must be a combination of CLONE_* flags
26+
pcntl_unshare(): Argument #1 ($flags) must be a combination of CLONE_* flags, or at least one flag is unsupported by the kernel

0 commit comments

Comments
 (0)