summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--win32/win32.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 7f73649c0..22c634d15 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jan 26 10:45:19 2005 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/win32.c (flock_winnt, flock_win95): unlock file even if
+ LOCK_NB is specified.
+
Tue Jan 25 23:10:48 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk: merge tcltklib for Ruby/Tk installation control
diff --git a/win32/win32.c b/win32/win32.c
index e8fea8072..9de71d7a2 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -289,6 +289,7 @@ flock_winnt(VALUE self, int argc, VALUE* argv)
0, LK_LEN, LK_LEN, &o), i);
break;
case LOCK_UN: /* unlock lock */
+ case LOCK_UN|LOCK_NB: /* unlock is always non-blocking, I hope */
LK_ERR(UnlockFileEx(fh, 0, LK_LEN, LK_LEN, &o), i);
break;
default: /* unknown */
@@ -316,6 +317,7 @@ flock_win95(VALUE self, int argc, VALUE* argv)
LK_ERR(LockFile(fh, 0, 0, LK_LEN, LK_LEN), i);
break;
case LOCK_UN:
+ case LOCK_UN|LOCK_NB:
LK_ERR(UnlockFile(fh, 0, 0, LK_LEN, LK_LEN), i);
break;
default: