summaryrefslogtreecommitdiff
path: root/ext/session
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2003-09-24 23:39:14 +0000
committerIlia Alshanetsky <iliaa@php.net>2003-09-24 23:39:14 +0000
commit569bd005d2534e529dcc04a6a2c6e6f0322817bf (patch)
tree6d5b2b65f79e7d02c135f4cc9612d3383ac509ee /ext/session
parent102a5cadfd06b147c072493317a7c758794847f7 (diff)
downloadphp-git-569bd005d2534e529dcc04a6a2c6e6f0322817bf.tar.gz
Fixed bug #25070 (Don't forget to unlock session files on win32 before
closing them). Regions should be locked only briefly and should be unlocked before closing a file or exiting the program. On Win32 locked files that are closed without being explicitly unlocked will be unlocked only when "system resources become avaliable".
Diffstat (limited to 'ext/session')
-rw-r--r--ext/session/mod_files.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c
index 50db773d50..bd5bf660a6 100644
--- a/ext/session/mod_files.c
+++ b/ext/session/mod_files.c
@@ -127,6 +127,7 @@ static char *ps_files_path_create(char *buf, size_t buflen, ps_files *data, cons
static void ps_files_close(ps_files *data)
{
if (data->fd != -1) {
+ flock(data->fd, LOCK_UN);
close(data->fd);
data->fd = -1;
}