From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 17 11:53:21 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB0901065688 for ; Fri, 17 Oct 2008 11:53:21 +0000 (UTC) (envelope-from pdegoeje@service2media.com) Received: from mx.utwente.nl (unknown [IPv6:2001:610:1908:1000:204:23ff:feb7:b8fe]) by mx1.freebsd.org (Postfix) with ESMTP id 375508FC2D for ; Fri, 17 Oct 2008 11:53:20 +0000 (UTC) (envelope-from pdegoeje@service2media.com) Received: from lux.student.utwente.nl (lux.student.utwente.nl [130.89.170.81]) by mx.utwente.nl (8.12.10/SuSE Linux 0.7) with ESMTP id m9HBqls8012669; Fri, 17 Oct 2008 13:52:47 +0200 From: Pieter de Goeje To: freebsd-hackers@freebsd.org Date: Fri, 17 Oct 2008 13:52:46 +0200 User-Agent: KMail/1.9.10 References: <20081017094820.GA2013@doom.ctinet.ru> In-Reply-To: <20081017094820.GA2013@doom.ctinet.ru> Organization: Service2Media MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810171352.46688.pdegoeje@service2media.com> X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact servicedesk@icts.utwente.nl for more information. X-UTwente-MailScanner: Found to be clean X-UTwente-MailScanner-From: pdegoeje@service2media.com X-Spam-Status: No X-Mailman-Approved-At: Fri, 17 Oct 2008 11:57:56 +0000 Cc: Igor Pokrovsky Subject: Re: lock test from sh script X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2008 11:53:21 -0000 On Friday 17 October 2008, Igor Pokrovsky wrote: > Hi all! > > I need to check if file is locked or not (with flock) from a shell > script. I remember there was something but cannot recall what exactly. > And if possible I do not want to write my own test utility even it > is several lines in length) > > Thanks, > -ip Perhaps you mean lockf(3) ? -- Pieter de Goeje