File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 26
26
#include "zend_compile.h"
27
27
#include "ZendAccelerator.h"
28
28
#include "zend_persist.h"
29
+ #include "zend_portability.h"
29
30
#include "zend_shared_alloc.h"
30
31
#include "zend_accelerator_module.h"
31
32
#include "zend_accelerator_blacklist.h"
@@ -3410,6 +3411,8 @@ void accel_shutdown(void)
3410
3411
}
3411
3412
}
3412
3413
3414
+ ZEND_EXT_API void (* zend_accel_schedule_restart_hook )(zend_accel_restart_reason reason );
3415
+
3413
3416
void zend_accel_schedule_restart (zend_accel_restart_reason reason )
3414
3417
{
3415
3418
const char * zend_accel_restart_reason_text [ACCEL_RESTART_USER + 1 ] = {
@@ -3418,6 +3421,10 @@ void zend_accel_schedule_restart(zend_accel_restart_reason reason)
3418
3421
"user" ,
3419
3422
};
3420
3423
3424
+ if (UNEXPECTED (zend_accel_schedule_restart_hook )) {
3425
+ zend_accel_schedule_restart_hook (reason );
3426
+ }
3427
+
3421
3428
if (ZCSG (restart_pending )) {
3422
3429
/* don't schedule twice */
3423
3430
return ;
Original file line number Diff line number Diff line change @@ -311,8 +311,9 @@ extern const char *zps_api_failure_reason;
311
311
BEGIN_EXTERN_C ()
312
312
313
313
void accel_shutdown (void );
314
- zend_result accel_activate (INIT_FUNC_ARGS );
314
+ zend_result accel_activate (INIT_FUNC_ARGS );
315
315
zend_result accel_post_deactivate (void );
316
+ extern ZEND_EXT_API void (* zend_accel_schedule_restart_hook )(zend_accel_restart_reason reason );
316
317
void zend_accel_schedule_restart (zend_accel_restart_reason reason );
317
318
void zend_accel_schedule_restart_if_necessary (zend_accel_restart_reason reason );
318
319
accel_time_t zend_get_file_handle_timestamp (zend_file_handle * file_handle , size_t * size );
You can’t perform that action at this time.
0 commit comments