fix flaky posix test

This commit is contained in:
Joe Watkins 2019-06-05 16:34:50 +02:00
parent a3e6b50442
commit f4474e5724
No known key found for this signature in database
GPG key ID: F9BA0ADA31CBD89E

View file

@ -7,23 +7,14 @@ Francesco Fullone ff@ideato.it
--SKIPIF--
<?php
if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
if(!extension_loaded("pcntl")) print "skip - PCNTL extension required";
?>
--FILE--
<?php
echo "*** Test by calling function with pid error ***\n";
$pid = 10000;
posix_kill((2 ** 22) + 1, SIGKILL);
do {
$pid += 1;
$result = shell_exec("ps -p " . $pid);
} while (strstr($pid, $result));
posix_kill($pid, SIGKILL);
var_dump(posix_errno());
?>
--EXPECTF--
*** Test by calling function with pid error ***