Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Jul 1998 17:14:26 -0700
From:      Mike Smith <mike@smith.net.au>
To:        Brian Feldman <green@zone.baldcom.net>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: flock(2) problem & fix 
Message-ID:  <199808010014.RAA01387@dingo.cdrom.com>
In-Reply-To: Your message of "Fri, 31 Jul 1998 20:05:19 EDT." <Pine.BSF.4.02.9807311954190.25645-200000@zone.baldcom.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> Our flock(2) doesn't seem to do the right thing all the time. It seems
> that any user with read access to a file is allowed exclusive locking of
> it, which I think is wrong (does everyone agree?), and that a shared lock
> should be used, because the user does not own the file, and has no write
> permission, therefore no need for an exclusive lock.  I raise the question
> as to whether it should matter if the lock is non-blocking or not, and
> that should be considered I suppose, as to assure the Right Thing will
> happen. Attached is a patch to sys/kern/kern_descrip.c which should fix
> the problem but is untested.

Sorry, I think you mistyped that last bit.  Shouldn't it read "the 
tested patch is contained in PR kern/XXXX" ?

8)

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808010014.RAA01387>