]> granicus.if.org Git - php/blob
19e306b2ee
[php] /
1 --TEST--
2 Test posix_getpgid() function : error conditions
3 --SKIPIF--
4 <?php
5 if((!extension_loaded("posix")) || (!function_exists("posix_getpgid"))) {
6          print "skip - POSIX extension not loaded or posix_getpgid() does not exist";
7 }
8 ?>
9 --FILE--
10 <?php
11 /* Prototype  : proto int posix_getpgid(void)
12  * Description: Get the process group id of the specified process (This is not a POSIX function, but a SVR4ism, so we compile conditionally)
13  * Source code: ext/posix/posix.c
14  * Alias to functions:
15  */
16
17 echo "*** Testing posix_getpgid() : error conditions ***\n";
18
19 echo "\n-- Testing posix_getpgid() with negative pid  --\n";
20 $pid = -99;
21 var_dump( posix_getpgid($pid) );
22
23 echo "Done";
24 ?>
25 --EXPECTF--
26 *** Testing posix_getpgid() : error conditions ***
27
28 -- Testing posix_getpgid() with negative pid  --
29 bool(false)
30 Done