projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e16acfd
)
FIX #2122: file locking bug
author
Simon Marlow
<simonmar@microsoft.com>
Tue, 26 Feb 2008 10:46:50 +0000
(10:46 +0000)
committer
Simon Marlow
<simonmar@microsoft.com>
Tue, 26 Feb 2008 10:46:50 +0000
(10:46 +0000)
Second and subsequent readers weren't being inserted into the
fd->lock hash table, which meant that the file wasn't correctly
unlocked when the Handles were closed.
rts/posix/FileLock.c
patch
|
blob
|
history
diff --git
a/rts/posix/FileLock.c
b/rts/posix/FileLock.c
index
436d8c9
..
8d25820
100644
(file)
--- a/
rts/posix/FileLock.c
+++ b/
rts/posix/FileLock.c
@@
-88,6
+88,7
@@
lockFile(int fd, dev_t dev, ino_t ino, int for_writing)
if (for_writing || lock->readers < 0) {
return -1;
}
+ insertHashTable(fd_hash, fd, lock);
lock->readers++;
return 0;
}