Browse Source

Merge branch 'PHP-5.6'

* PHP-5.6:
  Fixed Bug #66623 no EINTR check on flock(LOCK_EX)

Conflicts:
	ext/session/mod_files.c
pull/1045/head
Yasuo Ohgaki 11 years ago
parent
commit
1aa6242dcf
  1. 5
      ext/session/mod_files.c

5
ext/session/mod_files.c

@ -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…
Cancel
Save