bug73783.phpt 383 B

1234567891011121314151617181920212223242526
  1. --TEST--
  2. Bug #73783: (SIG_IGN needs to be set to prevent syscals from returning early)
  3. --EXTENSIONS--
  4. pcntl
  5. posix
  6. --FILE--
  7. <?php
  8. pcntl_signal(SIGCHLD, SIG_IGN);
  9. switch(pcntl_fork()) {
  10. case 0:
  11. exit;
  12. break;
  13. }
  14. $before = microtime(true);
  15. sleep(1);
  16. if (microtime(true) - $before >= 0.8) {
  17. echo "working\n";
  18. } else {
  19. echo "failed\n";
  20. }
  21. ?>
  22. --EXPECT--
  23. working