bug78272.phpt 470 B

1234567891011121314151617181920212223242526272829
  1. --TEST--
  2. Bug #78272: calling preg_match() before pcntl_fork() will freeze child process
  3. --EXTENSIONS--
  4. pcntl
  5. --FILE--
  6. <?php
  7. preg_match('/abc/', 'abcde', $r);
  8. $pid = pcntl_fork();
  9. if ($pid === 0) {
  10. print "Child start\n";
  11. preg_match('/abc/', 'abcde', $r);
  12. print_r($r);
  13. print "End child\n";
  14. exit(0);
  15. } else {
  16. pcntl_waitpid($pid, $status);
  17. print "End Main\n";
  18. exit(0);
  19. }
  20. ?>
  21. --EXPECT--
  22. Child start
  23. Array
  24. (
  25. [0] => abc
  26. )
  27. End child
  28. End Main