Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Nov 2001 23:46:45 +0200 (EET)
From:      Andrey Simonenko <simon@simon.org.ua>
To:        iedowse@FreeBSD.org
Cc:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/23353: fcntl(F_GETLK) return l_pid equal to -1 for the file loked with flock()
Message-ID:  <20011118233624.H62085-100000@lion.com.ua>
In-Reply-To: <200111181559.fAIFxE920989@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help


On Sun, 18 Nov 2001 iedowse@FreeBSD.org wrote:

> Synopsis: fcntl(F_GETLK) return l_pid equal to -1 for the file loked with flock()
>
> State-Changed-From-To: open->feedback
> State-Changed-By: iedowse
> State-Changed-When: Sun Nov 18 07:58:16 PST 2001
> State-Changed-Why:
>
> Can this be closed? In the audit-trail it is suggested that this is
> expected behaviour.
>

May be my bug report isn't really a bug, but a message from Maxim didn't
make me think so. I know that in one case locks are inhereted by childs,
and in other case they aren't. The original my bug report was about
another thing. In the fcntl(2) manual page we can read that: "Note that
flock(2) and fcntl(2) locks can be safely used concurrently". And this
works. And if I locked some file with flock(2), then fcntl(F_GETLK) call
in some another process can tell me that that file is locked. But l_pid
field in the flock structure always is equal to -1 if file is locked with
flock(2) call (at least in my experiments). Also I haven't find any
information about this in manual pages.

> http://www.FreeBSD.org/cgi/query-pr.cgi?pr=23353
>


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




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