mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-5.6'
* PHP-5.6: Fixed Bug #66623 no EINTR check on flock(LOCK_EX) Conflicts: ext/session/mod_files.c
This commit is contained in:
commit
1aa6242dcf
1 changed files with 4 additions and 1 deletions
|
@ -159,6 +159,7 @@ static void ps_files_open(ps_files *data, const char *key)
|
|||
#if !defined(O_NOFOLLOW) || !defined(PHP_WIN32)
|
||||
struct stat sbuf;
|
||||
#endif
|
||||
int ret;
|
||||
|
||||
if (data->fd < 0 || !data->lastkey || strcmp(key, data->lastkey)) {
|
||||
if (data->lastkey) {
|
||||
|
@ -201,7 +202,9 @@ static void ps_files_open(ps_files *data, const char *key)
|
|||
return;
|
||||
}
|
||||
#endif
|
||||
flock(data->fd, LOCK_EX);
|
||||
do {
|
||||
ret = flock(data->fd, LOCK_EX);
|
||||
} while (ret == -1 && errno == EINTR);
|
||||
|
||||
#ifdef F_SETFD
|
||||
# ifndef FD_CLOEXEC
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue