1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Log a warning when opcache lock file permissions could not be changed

Closes GH-18742.
This commit is contained in:
Taavi Eomäe
2025-06-02 17:37:40 +03:00
committed by Niels Dossche
parent 36891a6775
commit 0a8961a0e2
2 changed files with 5 additions and 1 deletions

2
NEWS
View File

@@ -121,6 +121,8 @@ PHP NEWS
. Fixed ZTS OPcache build on Cygwin. (cmb)
. Added opcache.file_cache_read_only. (Samuel Melrose)
. Updated default value of opcache.jit_hot_loop. (Arnaud)
. Log a warning when opcache lock file permissions could not be changed.
(Taavi Eomäe)
- Output:
. Fixed calculation of aligned buffer size. (cmb)

View File

@@ -115,7 +115,9 @@ void zend_shared_alloc_create_lock(char *lockfile_path)
zend_accel_error_noreturn(ACCEL_LOG_FATAL, "Unable to create opcache lock file in %s: %s (%d)", lockfile_path, strerror(errno), errno);
}
fchmod(lock_file, 0666);
if (fchmod(lock_file, 0666) == -1) {
zend_accel_error(ACCEL_LOG_WARNING, "Unable to change opcache lock file permissions in %s: %s (%d)", lockfile_path, strerror(errno), errno);
}
val = fcntl(lock_file, F_GETFD, 0);
val |= FD_CLOEXEC;