1--TEST-- 2Test function posix_errno() by calling it with its expected arguments 3--CREDITS-- 4Morten Amundsen mor10am@gmail.com 5Francesco Fullone ff@ideato.it 6#PHPTestFest Cesena Italia on 2009-06-20 7--SKIPIF-- 8<?php 9 if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; 10 if(!extension_loaded("pcntl")) print "skip - PCNTL extension required"; 11?> 12--FILE-- 13<?php 14 15echo "*** Test by calling function with pid error ***\n"; 16 17$pid = 10000; 18 19do { 20 $pid += 1; 21 $result = shell_exec("ps -p " . $pid); 22} while (strstr($pid, $result)); 23 24posix_kill($pid, SIGKILL); 25var_dump(posix_errno()); 26 27?> 28--EXPECTF-- 29*** Test by calling function with pid error *** 30int(3) 31