php-src/ext/pcntl
Arnaud Le Blanc c561f7da85
Refresh zend_mm shadow key on fork
The shadow key is refreshed when resetting the memory manager between two
requests. But in forking SAPIs the first request of a child process inherits the
shadow key of the parent. As a result, a leak of the shadow key during the first
request of one process gives away the shadow key used during the first request
of other processes. This makes the key refresh mechanism less useful.

Here I ensure that we refresh the shadow key after a fork. We can not reset the
manager as there may be active allocations. Instead, we have to recompute shadow
pointers with the new key.

Closes GH-16765
2025-07-29 14:00:37 +02:00
..
tests ext/pcntl: Added rusage parameter to pcntl_waitid 2025-06-24 19:21:03 +01:00
config.m4 ext/pcntl: following up #15921 rework SYS_pidfd_open configure detection. (#18931) 2025-06-24 21:55:00 +01:00
CREDITS
pcntl.c Refresh zend_mm shadow key on fork 2025-07-29 14:00:37 +02:00
pcntl.stub.php ext/pcntl: Added rusage parameter to pcntl_waitid 2025-06-24 19:21:03 +01:00
pcntl_arginfo.h ext/pcntl: Added rusage parameter to pcntl_waitid 2025-06-24 19:21:03 +01:00
php_pcntl.h ext/pcntl: Pack module globals struct 2025-07-06 18:24:38 +01:00
php_signal.c Set SA_ONSTACK too when zend signals are disabled and in pcntl 2022-10-16 23:47:53 +01:00
php_signal.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00