[PATCH] buglets in file locking

Casey Marshall csm@gnu.org
Fri Nov 12 06:07:00 GMT 2004


Hi,

This patch fixes a couple of buglets in the FileLock implementation in
libgcj. Both were flipped meanings, one that a file lock is valid only
while the associated channel is open, and another that a shared lock
maps to F_RDLCK. The original implementation assumed the opposite.

2004-11-11  Casey Marshall  <csm@gnu.org>

	* gnu/java/nio/FileLock.java (isValid): locks are valid if the
	channel is open.
	* gnu/java/nio/channels/natFileChannelPosix.cc (lock): use
	'F_RDLCK' for shared locks, 'F_WRLCK' for exclusive locks.

-- 
Casey Marshall || csm@gnu.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: flock.patch
Type: text/x-patch
Size: 1211 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20041112/432eb7fc/attachment.bin>


More information about the Java-patches mailing list