From 569bd005d2534e529dcc04a6a2c6e6f0322817bf Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Wed, 24 Sep 2003 23:39:14 +0000 Subject: [PATCH] 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". --- ext/session/mod_files.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.40.0