]> granicus.if.org Git - php/commitdiff
Fix posix_errno test without PCNTL dep
authorPeter Kokot <peterkokot@gmail.com>
Tue, 25 Jun 2019 18:21:16 +0000 (20:21 +0200)
committerPeter Kokot <peterkokot@gmail.com>
Wed, 26 Jun 2019 22:24:37 +0000 (00:24 +0200)
When PCNTL extension is not enabled, the SIGKILL constant is also not
available.

ext/posix/tests/posix_errno_variation2.phpt

index 6335fa532718274b4a18e1d9eb2bd3d19579fc58..7a4695d0e644ce3206bb9a6e57ec1c815473b27a 100644 (file)
@@ -12,7 +12,10 @@ Francesco Fullone ff@ideato.it
 <?php
 echo "*** Test by calling function with pid error ***\n";
 
-posix_kill((2 ** 22) + 1, SIGKILL);
+// Don't rely on PCNTL extension being around
+$SIGKILL = 9;
+
+posix_kill((2 ** 22) + 1, $SIGKILL);
 
 var_dump(posix_errno());
 ?>