frankenphp
16fdfa25 - fix: fatal php shutdowns (#2293)

Commit
5 days ago
fix: fatal php shutdowns (#2293) Fixes #2268 (and maybe others) In that issue, a timeout during a `curl_multi` request leads to a fatal error and bailout during `php_request_shutdown()`. After looking at the [FPM](https://github.com/php/php-src/blob/9011bd31d7c26b2f255e550171548eb024d1e4ce/sapi/fpm/fpm/fpm_main.c#L1926) implementation I realized it also wraps `php_request_shutdown()` with a `zend_bailout`, which we don't. This PR wraps the shutdown function and restarts ZTS in case of an unexpected bailout, which fixes #2268 and prevents any potential crashes from bailouts during shutdown. Still a draft since I think it might make sense to wrap the whole request loop in a `zend_try`.
Author
Parents
Loading