projects
/
php
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
853ae39
)
Fixed Bug #66623 no EINTR check on flock(LOCK_EX)
author
Yasuo Ohgaki
<yohgaki@php.net>
Tue, 3 Feb 2015 05:02:58 +0000
(14:02 +0900)
committer
Yasuo Ohgaki
<yohgaki@php.net>
Tue, 3 Feb 2015 05:02:58 +0000
(14:02 +0900)
ext/session/mod_files.c
patch
|
blob
|
history
diff --git
a/ext/session/mod_files.c
b/ext/session/mod_files.c
index 0ce73bd56c448ae35951718b7bd6789ecc67fcf4..195104f391f450870f19effcebe343e2b7945be1 100644
(file)
--- a/
ext/session/mod_files.c
+++ b/
ext/session/mod_files.c
@@
-121,7
+121,8
@@
static void ps_files_close(ps_files *data)
static void ps_files_open(ps_files *data, const char *key TSRMLS_DC)
{
char buf[MAXPATHLEN];
- struct stat sbuf;
+ struct stat sbuf;
+ int ret;
if (data->fd < 0 || !data->lastkey || strcmp(key, data->lastkey)) {
if (data->lastkey) {
@@
-164,7
+165,9
@@
static void ps_files_open(ps_files *data, const char *key TSRMLS_DC)
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