]> git.pld-linux.org Git - packages/php.git/blame - opcache-nokill-perm.patch
Rel 2; Don't get stuck if no permission to kill process (via opcache).
[packages/php.git] / opcache-nokill-perm.patch
CommitLineData
6310084f
AM
1--- php-8.2.17/ext/opcache/ZendAccelerator.c~ 2024-03-12 15:26:30.000000000 +0100
2+++ php-8.2.17/ext/opcache/ZendAccelerator.c 2024-03-20 11:45:08.979946189 +0100
3@@ -852,6 +852,10 @@ static inline void kill_all_lockers(stru
4 /* Process died before the signal was sent */
5 success = true;
6 zend_accel_error(ACCEL_LOG_WARNING, "Process %d died before SIGKILL was sent", mem_usage_check->l_pid);
7+ } else if (errno == EPERM) {
8+ /* We have no permission to kill the other process, so no point in trying */
9+ success = true;
10+ zend_accel_error(ACCEL_LOG_WARNING, "No permission to kill locker %d: %s. Assuming success.", mem_usage_check->l_pid, strerror(errno));
11 } else if (errno != 0) {
12 zend_accel_error(ACCEL_LOG_WARNING, "Failed to send SIGKILL to locker %d: %s", mem_usage_check->l_pid, strerror(errno));
13 }
14@@ -864,6 +868,10 @@ static inline void kill_all_lockers(stru
15 /* successfully killed locker, process no longer exists */
16 success = true;
17 zend_accel_error(ACCEL_LOG_WARNING, "Killed locker %d", mem_usage_check->l_pid);
18+ } else if (errno == EPERM) {
19+ /* We have no permission to kill the other process, so no point in trying */
20+ success = true;
21+ zend_accel_error(ACCEL_LOG_WARNING, "No permission to kill locker %d again: %s. Assuming success.", mem_usage_check->l_pid, strerror(errno));
22 } else if (errno != 0) {
23 zend_accel_error(ACCEL_LOG_WARNING, "Failed to check locker %d: %s", mem_usage_check->l_pid, strerror(errno));
24 }
This page took 0.059676 seconds and 4 git commands to generate.