From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: persistent file locks (was: How to successively log stuff to a file?) Date: Thu, 06 Feb 2014 08:21:54 +0200 Message-ID: <83r47gzrp9.fsf@gnu.org> References: <87wqhbaho3.fsf@web.de> <87wqhb5a2y.fsf@rosalinde.fritz.box> <87mwi4c2vu.fsf_-_@web.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1391667729 1004 80.91.229.3 (6 Feb 2014 06:22:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Feb 2014 06:22:09 +0000 (UTC) Cc: emacs-devel@gnu.org To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 06 07:22:16 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WBILo-0005jl-BW for ged-emacs-devel@m.gmane.org; Thu, 06 Feb 2014 07:22:16 +0100 Original-Received: from localhost ([::1]:34837 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBILn-0008C4-UL for ged-emacs-devel@m.gmane.org; Thu, 06 Feb 2014 01:22:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBILe-0008Av-0P for emacs-devel@gnu.org; Thu, 06 Feb 2014 01:22:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBILW-0002Jk-Mu for emacs-devel@gnu.org; Thu, 06 Feb 2014 01:22:05 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:64560) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBILW-0002Jc-ER for emacs-devel@gnu.org; Thu, 06 Feb 2014 01:21:58 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0N0K00M009DAXL00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Thu, 06 Feb 2014 08:21:57 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N0K00M3A9OKI770@a-mtaout20.012.net.il>; Thu, 06 Feb 2014 08:21:57 +0200 (IST) In-reply-to: <87mwi4c2vu.fsf_-_@web.de> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:169429 Archived-At: > From: Michael Heerdegen > Date: Thu, 06 Feb 2014 04:54:13 +0100 > > When the user runs multiple Emacs processes, my lib should not cause > both processes to append to one and the same file. I want to use Emacs > file locks for preventing that. After reading > (info "(elisp) File Locks"), it seems that locks are handled only > implicitly, and are removed when the associated buffer is not modified > any more. I need a persistent lock. Is there a way to achieve this? > Or what would you recommend to do instead? Name the file with the Emacs PID in the file name?