mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
ext/pcntl: pcntl affinity improves EINVAL handling in both cases. (#13907)
also disable tests on travis.
This commit is contained in:
parent
814098248c
commit
dd2ffaab2c
2 changed files with 7 additions and 0 deletions
|
@ -1516,6 +1516,9 @@ PHP_FUNCTION(pcntl_getcpuaffinity)
|
||||||
case EPERM:
|
case EPERM:
|
||||||
php_error_docref(NULL, E_WARNING, "Calling process not having the proper privileges");
|
php_error_docref(NULL, E_WARNING, "Calling process not having the proper privileges");
|
||||||
break;
|
break;
|
||||||
|
case EINVAL:
|
||||||
|
zend_value_error("invalid cpu affinity mask size");
|
||||||
|
RETURN_THROWS();
|
||||||
default:
|
default:
|
||||||
php_error_docref(NULL, E_WARNING, "Error %d", errno);
|
php_error_docref(NULL, E_WARNING, "Error %d", errno);
|
||||||
}
|
}
|
||||||
|
@ -1597,6 +1600,9 @@ PHP_FUNCTION(pcntl_setcpuaffinity)
|
||||||
case EPERM:
|
case EPERM:
|
||||||
php_error_docref(NULL, E_WARNING, "Calling process not having the proper privileges");
|
php_error_docref(NULL, E_WARNING, "Calling process not having the proper privileges");
|
||||||
break;
|
break;
|
||||||
|
case EINVAL:
|
||||||
|
zend_argument_value_error(2, "invalid cpu affinity mask size or unmapped cpu id(s)");
|
||||||
|
RETURN_THROWS();
|
||||||
default:
|
default:
|
||||||
php_error_docref(NULL, E_WARNING, "Error %d", errno);
|
php_error_docref(NULL, E_WARNING, "Error %d", errno);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ pcntl
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php
|
<?php
|
||||||
if (!function_exists("pcntl_setcpuaffinity")) die("skip pcntl_setcpuaffinity is not available");
|
if (!function_exists("pcntl_setcpuaffinity")) die("skip pcntl_setcpuaffinity is not available");
|
||||||
|
if (getenv('TRAVIS')) die('skip Currently fails on Travis');
|
||||||
?>
|
?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue