Matti Aarnio writes:
> On Thu, May 03, 2001 at 06:03:07PM -0700, Jeremy Allison wrote:
> ...
> > The only change that Samba really requires is a POSIX lock that
> > has *exactly* the same semantics as present, except for the fact
> > the close(dup(fd)) doesn't drop all locks on an fd.
>
> You mean that:
>
> int fd2 = dup(fd);
> close(fd2);
>
> drops all locks at the original fd ?
Yeah, isn't it lovely? The POSIX committee was shopping around for a
locking spec, and one of the Unix vendors said "here, take ours". So
now everybody has the same brokenness. POSIX has no taste.
> Nowhere (in Solaris) is mention that dup(2) should copy locks
> from source fd to the new fd.
The locks aren't copied. They are shared, which is fine. The problem
is the bone-headed behaviour upon close. Stupid Unix vendor
implementation was:
file_close (file)
{
drop_locks (file);
}
instead of:
file_close (file)
{
if (--file->ref_count == 0) drop_locks (file);
}
Regards,
Richard....
Permanent: [EMAIL PROTECTED]
Current: [EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]