posix_getsid.phpt 701 B

12345678910111213141516171819202122232425262728
  1. --TEST--
  2. Test posix_getsid() function test
  3. --DESCRIPTION--
  4. Get the current session id of a process pid (POSIX.1, 4.2.1)
  5. Source code: ext/posix/posix.c
  6. --CREDITS--
  7. Moritz Neuhaeuser, info@xcompile.net
  8. PHP Testfest Berlin 2009-05-10
  9. --SKIPIF--
  10. <?php
  11. if(!extension_loaded("posix")) print "SKIP - POSIX extension not loaded";
  12. ?>
  13. --FILE--
  14. <?php
  15. echo "*** Testing posix_getsid() : function test ***\n";
  16. $pid = posix_getpid();
  17. echo "\n-- Testing posix_getsid() function with current process pid --\n";
  18. var_dump( is_long(posix_getsid($pid)) );
  19. ?>
  20. ===DONE===
  21. --EXPECTF--
  22. *** Testing posix_getsid() : function test ***
  23. -- Testing posix_getsid() function with current process pid --
  24. bool(true)
  25. ===DONE===