Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Zend/zend_execute_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,9 @@ static void zend_set_timeout_ex(zend_long seconds, bool reset_signals) /* {{{ */
return;
}
#elif defined(ZEND_MAX_EXECUTION_TIMERS)
zend_max_execution_timer_settime(seconds);
if (seconds > 0) {
zend_max_execution_timer_settime(seconds);
}

if (reset_signals) {
sigset_t sigset;
Expand Down Expand Up @@ -1618,7 +1620,9 @@ void zend_unset_timeout(void) /* {{{ */
tq_timer = NULL;
}
#elif ZEND_MAX_EXECUTION_TIMERS
zend_max_execution_timer_settime(0);
if (EG(timeout_seconds)) {
zend_max_execution_timer_settime(0);
}
#elif defined(HAVE_SETITIMER)
if (EG(timeout_seconds)) {
struct itimerval no_timeout;
Expand Down
Loading