Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Dec 2000 04:28:35 -0800 (PST)
From:      simon@comsys.ntu-kpi.kiev.ua
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/23353: fcntl(F_GETLK) return l_pid equal to -1 for the file loked with flock()
Message-ID:  <200012071228.eB7CSZI37516@freefall.freebsd.org>
Resent-Message-ID: <200012071230.eB7CU2l37685@freefall.freebsd.org>

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

>Number:         23353
>Category:       kern
>Synopsis:       fcntl(F_GETLK) return l_pid equal to -1 for the file loked with flock()
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 07 04:30:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Andrey Simonenko
>Release:        4.1-STABLE i386
>Organization:
>Environment:
>Description:
If file is locked with flock() function and when I try to use fcntl(F_GETLK) function then it returns flock structure with following fileds:

l_type != F_UNLCK
l_pid == -1

if l_type isn't equal to F_UNLCK then I suppose that file is locked, but l_pid is always equal to -1.

From the fcnlt(2) manual page:

Note that flock(2) and fcntl(2) locks may be safely used concurrently.

That's why I think that it is a bug in flock() or fcntl() implementation.
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


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?200012071228.eB7CSZI37516>