From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.devel Subject: desktop.el and his lock file Date: Tue, 02 Dec 2008 22:26:58 +0100 Message-ID: <87ej0qfeu5.fsf@tux.homenetwork> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1228285832 8690 80.91.229.12 (3 Dec 2008 06:30:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Dec 2008 06:30:32 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 03 07:31:35 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L7lGm-0002bH-VN for ged-emacs-devel@m.gmane.org; Wed, 03 Dec 2008 07:31:33 +0100 Original-Received: from localhost ([127.0.0.1]:40029 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7lFc-0003xn-GE for ged-emacs-devel@m.gmane.org; Wed, 03 Dec 2008 01:30:20 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L7lFU-0003xh-Ak for emacs-devel@gnu.org; Wed, 03 Dec 2008 01:30:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L7lFS-0003xV-DX for emacs-devel@gnu.org; Wed, 03 Dec 2008 01:30:11 -0500 Original-Received: from [199.232.76.173] (port=54307 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7lFS-0003xS-46 for emacs-devel@gnu.org; Wed, 03 Dec 2008 01:30:10 -0500 Original-Received: from main.gmane.org ([80.91.229.2]:40928 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L7lFR-0000g8-Lj for emacs-devel@gnu.org; Wed, 03 Dec 2008 01:30:09 -0500 Original-Received: from root by ciao.gmane.org with local (Exim 4.43) id 1L7lFK-0007S4-GE for emacs-devel@gnu.org; Wed, 03 Dec 2008 06:30:02 +0000 Original-Received: from 49.78.88-79.rev.gaoland.net ([79.88.78.49]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Dec 2008 06:30:02 +0000 Original-Received: from thierry.volpiatto by 49.78.88-79.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Dec 2008 06:30:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 25 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 49.78.88-79.rev.gaoland.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:106507 Archived-At: Hi, may be i found a bug in desktop.el: when killing emacs brutally like with killall or something like that, emacs when starting again, if desktop is used, use the file .emacs.desktop.lock (default) I think emacs should check if the pid that is in this file is always in use. here is the code i put after line 967 in desktop.el: the function is desktop-read ,---- | (if (and owner | (eq 0 (call-process-shell-command (format "ps -u %s | grep emacs | grep %d" (getenv "USER") owner))) | ..... `---- that seem to work fine here. May be you can provide something better. I know there is a variable (`desktop-load-locked-desktop') to avoid that, but if we forget to set it and we use new feature emacs --daemon, that can hang the system. (it's what it did this afternoon for me!) Anyway i will submit a bug also. Thanks. -- A + Thierry Volpiatto Location: Saint-Cyr-Sur-Mer - France