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:
Yasuo Ohgaki 2015-02-03 14:07:23 +09:00
commit 1aa6242dcf

View file

@ -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