From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 17 10:03:05 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24073106568A for ; Fri, 17 Oct 2008 10:03:05 +0000 (UTC) (envelope-from ip@doom.ctinet.ru) Received: from hosting.ctinet.ru (hosting.ctinet.ru [213.159.69.2]) by mx1.freebsd.org (Postfix) with ESMTP id 87B4C8FC1B for ; Fri, 17 Oct 2008 10:03:04 +0000 (UTC) (envelope-from ip@doom.ctinet.ru) Received: from doom.ctinet.ru (doom.ctinet.ru [213.159.64.57]) (authenticated bits=0) by hosting.ctinet.ru (8.14.2/8.14.2) with ESMTP id m9H9mKlx007651 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 17 Oct 2008 13:48:21 +0400 (MSD) (envelope-from ip@doom.ctinet.ru) Received: from doom.ctinet.ru (localhost [127.0.0.1]) by doom.ctinet.ru (8.14.3/8.14.3) with ESMTP id m9H9mKAZ002033 for ; Fri, 17 Oct 2008 13:48:20 +0400 (MSD) (envelope-from ip@doom.ctinet.ru) Received: (from ip@localhost) by doom.ctinet.ru (8.14.3/8.14.3/Submit) id m9H9mKrK002032 for hackers@freebsd.org; Fri, 17 Oct 2008 13:48:20 +0400 (MSD) (envelope-from ip) Date: Fri, 17 Oct 2008 13:48:20 +0400 From: Igor Pokrovsky To: hackers@freebsd.org Message-ID: <20081017094820.GA2013@doom.ctinet.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Mailman-Approved-At: Fri, 17 Oct 2008 11:22:43 +0000 Cc: Subject: 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 10:03:05 -0000 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