From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.devel Subject: Re: 24.0.90; Closing an emacsclient frame always kills daemon Date: Sat, 08 Oct 2011 14:35:45 -0400 Message-ID: <87botr72m6.fsf@maru.md5i.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1318098962 24078 80.91.229.12 (8 Oct 2011 18:36:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 8 Oct 2011 18:36:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: Damien Cassou Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 08 20:35:58 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RCbkZ-0008N9-Mr for ged-emacs-devel@m.gmane.org; Sat, 08 Oct 2011 20:35:55 +0200 Original-Received: from localhost ([::1]:60895 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCbkZ-0002Ap-9W for ged-emacs-devel@m.gmane.org; Sat, 08 Oct 2011 14:35:55 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:55982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCbkW-0002Ak-R0 for emacs-devel@gnu.org; Sat, 08 Oct 2011 14:35:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RCbkV-0002mi-K5 for emacs-devel@gnu.org; Sat, 08 Oct 2011 14:35:52 -0400 Original-Received: from md5i.com ([75.151.244.229]:42621 helo=maru.md5i.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCbkV-0002ls-Hc for emacs-devel@gnu.org; Sat, 08 Oct 2011 14:35:51 -0400 Original-Received: from md5i by maru.md5i.com with local (Exim 4.76) (envelope-from ) id 1RCbkP-0006DQ-BB; Sat, 08 Oct 2011 14:35:45 -0400 In-Reply-To: (Damien Cassou's message of "Wed, 5 Oct 2011 14:24:53 +0200") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 75.151.244.229 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:144759 Archived-At: Damien Cassou writes: > I open emacs with the following: > > emacsclient --alternate-editor="" -c ~/.bashrc > > According to the manual, it creates a daemon if none is running and > then creates a client by connecting to this daemon. I confirm this > behavior by looking at the running processes: I have one process for > emacsclient and one for emacs --daemon. However, as soon as I close > the last running emacsclient (with C-x C-c or C-x #), the daemon is > also terminated. Some more information: > > - Running with gdb prints a "Program existed normally". I have encountered this with gdb as well. I solved this by adding the following lines to my src/.gdbinit: # Follow emacs when running using --daemon. We need to follow the # child of the daemonizing fork, and go back to following parent's # shortly afterward. break main commands silent set follow-fork-mode child continue end break init_signals commands silent set follow-fork-mode parent continue end -- Michael Welsh Duggan (md5i@md5i.com)