From: Ilia Alshanetsky Date: Wed, 24 Sep 2003 23:39:14 +0000 (+0000) Subject: Fixed bug #25070 (Don't forget to unlock session files on win32 before X-Git-Tag: RELEASE_1_3b2~68 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=569bd005d2534e529dcc04a6a2c6e6f0322817bf;p=php 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". --- 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; }