On Fri, May 04, 2001 at 08:27:04AM -0600, Richard Gooch wrote:
> Matti Aarnio writes:
> >
> > 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);
> }
Yes - if this *one* change could be made for the new
lock type, that would be sufficient. That's the only
fix needed as far as Samba is concerned.
Jeremy.
--
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]