Annotation of embedaddon/php/ext/pcntl/tests/pcntl_alarm.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: pcntl_alarm()
                      3: --SKIPIF--
                      4: <?php if (!function_exists("pcntl_sigtimedwait")) die("skip pcntl_sigtimedwait() not available"); ?>
                      5: --INI--
                      6: max_execution_time=0
                      7: --FILE--
                      8: <?php
                      9: pcntl_signal(SIGALRM, function(){});
                     10: 
                     11: var_dump(pcntl_alarm());
                     12: pcntl_alarm(0);
                     13: var_dump(pcntl_alarm(60));
                     14: var_dump(pcntl_alarm(1) > 0);
                     15: $siginfo = array();
                     16: var_dump(pcntl_sigtimedwait(array(SIGALRM),$siginfo,2) === SIGALRM);
                     17: ?>
                     18: --EXPECTF--
                     19: Warning: pcntl_alarm() expects exactly 1 parameter, 0 given in %s
                     20: NULL
                     21: int(0)
                     22: bool(true)
                     23: bool(true)

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