Annotation of embedaddon/php/ext/posix/tests/posix_errno_variation2.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test function posix_errno() by calling it with its expected arguments
        !             3: --CREDITS--
        !             4: Morten Amundsen mor10am@gmail.com
        !             5: Francesco 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: 
        !            15: echo "*** Test by calling function with pid error ***\n";
        !            16: 
        !            17: $pid = 10000;
        !            18: 
        !            19: do {
        !            20:   $pid += 1;           
        !            21:   $result = shell_exec("ps -p " . $pid);
        !            22: } while (strstr($pid, $result)); 
        !            23: 
        !            24: posix_kill($pid, SIGKILL);
        !            25: var_dump(posix_errno());
        !            26: 
        !            27: ?>
        !            28: --EXPECTF--
        !            29: *** Test by calling function with pid error ***
        !            30: int(3)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>