| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
  [2019-07-10 15:32 UTC] dams@php.net
 Description: ------------ When preg_match (or another preg_*function) has been called before pcntl_fork(), and then, called again in the child process, the child process stops at the preg_match, and just hangs. No error, no crash. This was tested on OSX, and it couldn't be replicated on Debian. This may be specific to OSX. It is reproductible with PHP 7.3.7. It works on 7.2, 7.1. It may be related to https://bugs.php.net/bug.php?id=77260 Test script: --------------- <?php // Uncomment the following to freeze child process // preg_match('/abc/', 'abcde', $r); $pid = pcntl_fork(); if ($pid === 0) { print "Child start\n"; preg_match('/abc/', 'abcde', $r); print_r($r); print "End child\n"; exit(0); } else { print "Main start\n"; sleep(3); print "End Main\n"; exit(0); } ?> Expected result: ---------------- Main start Child start Array ( [0] => abc ) End child End Main Actual result: -------------- Main start Child start End Main PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             | 
    |||||||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 09:00:01 2025 UTC | 
Here is my build sequence : git pull git checkout PHP-7.4; git pull make clean ./buildconf --force env YACC=`brew --prefix bison`/bin/bison ./configure \ --prefix="/usr/local/opt/php74" \ --with-config-file-path="/usr/local/etc/php71" \ --with-config-file-scan-dir=/usr/local/etc/phpng/conf.d \ --enable-mbstring \ --enable-tokenizer \ --with-curl=/usr/local/opt/curl/\ --enable-mbstring \ --with-sqlite3=/usr/local/Cellar/sqlite/3.28.0 \ --with-sodium=/usr/local/opt/libsodium \ --enable-json \ --enable-pcntl \ --disable-all gmake -j`sysctl -n hw.logicalcpu_max` gmake test I have the last OSX patches : System Version: macOS 10.14.5 (18F132) Kernel Version: Darwin 18.6.0