Skip to content

Commit e715224

Browse files
committed
Merge branch 'PHP-8.3'
* PHP-8.3: [ci skip] NEWS [ci skip] NEWS [ci skip] NEWS fix: don't delete an unitialized timer (#12537)
2 parents 74ba916 + e9d5f91 commit e715224

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Zend/zend_max_execution_timer.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,13 @@ ZEND_API void zend_max_execution_timer_init(void) /* {{{ */
4141
sev.sigev_signo = SIGRTMIN;
4242
sev.sigev_notify_thread_id = (pid_t) syscall(SYS_gettid);
4343

44-
EG(pid) = getpid();
4544
// Measure wall time instead of CPU time as originally planned now that it is possible https://github.com/php/php-src/pull/6504#issuecomment-1370303727
4645
if (timer_create(CLOCK_BOOTTIME, &sev, &EG(max_execution_timer_timer)) != 0) {
4746
zend_strerror_noreturn(E_ERROR, errno, "Could not create timer");
4847
}
4948

49+
EG(pid) = getpid();
50+
5051
# ifdef MAX_EXECUTION_TIMERS_DEBUG
5152
fprintf(stderr, "Timer %#jx created on thread %d\n", (uintmax_t) EG(max_execution_timer_timer), sev.sigev_notify_thread_id);
5253
# endif

0 commit comments

Comments
 (0)