From owner-freebsd-bugs Thu Dec 7 4:30: 7 2000 From owner-freebsd-bugs@FreeBSD.ORG Thu Dec 7 04:30:02 2000 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 6269637B401 for ; Thu, 7 Dec 2000 04:30:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id eB7CU2l37685; Thu, 7 Dec 2000 04:30:02 -0800 (PST) (envelope-from gnats) Resent-Date: Thu, 7 Dec 2000 04:30:02 -0800 (PST) Resent-Message-Id: <200012071230.eB7CU2l37685@freefall.freebsd.org> Resent-From: gnats-admin@FreeBSD.org (GNATS Management) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: gnats-admin@FreeBSD.org, simon@comsys.ntu-kpi.kiev.ua Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1734237B400 for ; Thu, 7 Dec 2000 04:28:36 -0800 (PST) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id eB7CSZI37516; Thu, 7 Dec 2000 04:28:35 -0800 (PST) (envelope-from nobody) Message-Id: <200012071228.eB7CSZI37516@freefall.freebsd.org> Date: Thu, 7 Dec 2000 04:28:35 -0800 (PST) From: simon@comsys.ntu-kpi.kiev.ua Sender: nobody@FreeBSD.org To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/23353: fcntl(F_GETLK) return l_pid equal to -1 for the file loked with flock() Resent-Sender: gnats@FreeBSD.org Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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