diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | win32/win32.c | 2 |
2 files changed, 7 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Wed Jan 26 10:51:50 2005 NAKAMURA Usaku <usa@ruby-lang.org> + + * win32/win32.c (flock_winnt, flock_win95): unlock file even if + LOCK_NB is specified. (backported from CVS HEAD) + Tue Jan 25 17:11:51 2005 NAKAMURA Usaku <usa@ruby-lang.org> * ruby.c (proc_options): correct -T option in RUBYOPT. (backported diff --git a/win32/win32.c b/win32/win32.c index 603e0f9a08..69080252fb 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -293,6 +293,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 */ @@ -320,6 +321,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: |