File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929
3030#include "php.h"
3131#include "ext/standard/info.h"
32+ #include "ext/standard/php_filestat.h"
3233#include "php_signal.h"
3334#include "php_ticks.h"
3435#include "zend_exceptions.h"
@@ -294,7 +295,7 @@ PHP_FUNCTION(pcntl_fork)
294295 }
295296 } else if (id == 0 ) {
296297 zend_max_execution_timer_init ();
297- realpath_cache_clean ( );
298+ php_clear_stat_cache (true, NULL , 0 );
298299 }
299300
300301 RETURN_LONG ((zend_long ) id );
@@ -1574,7 +1575,7 @@ PHP_FUNCTION(pcntl_rfork)
15741575 }
15751576 } else if (pid == 0 ) {
15761577 zend_max_execution_timer_init ();
1577- realpath_cache_clean ( );
1578+ php_clear_stat_cache (true, NULL , 0 );
15781579 }
15791580
15801581 RETURN_LONG ((zend_long ) pid );
@@ -1620,7 +1621,7 @@ PHP_FUNCTION(pcntl_forkx)
16201621 }
16211622 } else if (pid == 0 ) {
16221623 zend_max_execution_timer_init ();
1623- realpath_cache_clean ( );
1624+ php_clear_stat_cache (true, NULL , 0 );
16241625 }
16251626
16261627 RETURN_LONG ((zend_long ) pid );
Original file line number Diff line number Diff line change @@ -13,9 +13,11 @@ function proc_self_pid() {
1313}
1414
1515var_dump (proc_self_pid () === getmypid ());
16+ $ parent_inode = fileinode ('/proc/self ' );
1617
1718$ pid = pcntl_fork ();
1819if ($ pid === 0 ) {
20+ var_dump (fileinode ('/proc/self ' ) !== $ parent_inode );
1921 var_dump (proc_self_pid () === getmypid ());
2022 exit (0 );
2123}
@@ -24,3 +26,4 @@ pcntl_waitpid($pid, $status);
2426--EXPECT--
2527bool(true)
2628bool(true)
29+ bool(true)
You can’t perform that action at this time.
0 commit comments