From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: persistent file locks Date: Fri, 07 Feb 2014 13:27:45 +0100 Message-ID: <87wqh72jlq.fsf@web.de> References: <87wqhbaho3.fsf@web.de> <87wqhb5a2y.fsf@rosalinde.fritz.box> <87mwi4c2vu.fsf_-_@web.de> <83r47gzrp9.fsf@gnu.org> <87r47ghgnj.fsf@web.de> <83mwi4zljj.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1391776095 21956 80.91.229.3 (7 Feb 2014 12:28:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Feb 2014 12:28:15 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 07 13:28:23 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 1WBkXa-0000A7-AZ for ged-emacs-devel@m.gmane.org; Fri, 07 Feb 2014 13:28:18 +0100 Original-Received: from localhost ([::1]:41115 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBkXZ-0004PD-Uu for ged-emacs-devel@m.gmane.org; Fri, 07 Feb 2014 07:28:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBkXQ-0004NH-T6 for emacs-devel@gnu.org; Fri, 07 Feb 2014 07:28:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBkXK-0002jP-79 for emacs-devel@gnu.org; Fri, 07 Feb 2014 07:28:08 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:48652) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBkXK-0002jC-0i for emacs-devel@gnu.org; Fri, 07 Feb 2014 07:28:02 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WBkXI-0008MN-DA for emacs-devel@gnu.org; Fri, 07 Feb 2014 13:28:00 +0100 Original-Received: from ip-90-187-159-185.web.vodafone.de ([90.187.159.185]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 Feb 2014 13:28:00 +0100 Original-Received: from michael_heerdegen by ip-90-187-159-185.web.vodafone.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 Feb 2014 13:28:00 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 18 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ip-90-187-159-185.web.vodafone.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:YinKi9b4aAa7/jmU3zhoKa3F3T4= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:169461 Archived-At: Eli Zaretskii writes: > I don't understand why would you need to lock the file in the first > place. For starters, Emacs is quite capable of using the same file > from more than one session: it closes the file as soon as write-region > does its job. If you want to distinguish between log entries from > different sessions, you can have the Emacs PID be part of the entry. > > [...] Ok, thanks for the background. You've convinced me that I'd better not use locks. I think I'll follow your advice and just prepend each log line with the pid. Thanks again, Michael.