[php-src] PR #23828: Add OPcache restart hook, fired when a restart is carried out

From: Date: Mon, 21 Sep 2026 17:51:30 +0000
Subject: [php-src] PR #23828: Add OPcache restart hook, fired when a restart is carried out
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-38691@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/23828 Author: nicolas-grekas After #15590, which added zend_accel_schedule_restart_hook. That hook says a restart of OPcache's shared memory is coming, not that it happened: the restart runs later, at request startup, on whichever thread or process first finds the cache unused, and it can stay pending for a long time. This adds zend_accel_restart_hook, called on that thread once per restart, right after it completed and still under the SHM lock, with the same reason. FrankenPHP needs it for its logs and metrics: under ZTS the restart rewinds shared memory that other threads may still reference, so the exact moment matters for post-mortems, and the scheduling event alone doesn't tell an operator whether the restart ran at all. This targets master, like #15590 did at the same point of the 8.4 cycle.

« previous php.git-pulls (#38691) next »