From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.bugs Subject: bug#4944: 23.1.50; starting a server without forking a daemon Date: Thu, 19 Nov 2009 08:22:46 -0800 (PST) Message-ID: <200911191622.nAJGMkkI021001@godzilla.ics.uci.edu> References: <200911181825.nAIIPSmQ009732@godzilla.ics.uci.edu> Reply-To: Dan Nicolaescu , 4944@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1258650450 7043 80.91.229.12 (19 Nov 2009 17:07:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Nov 2009 17:07:30 +0000 (UTC) Cc: 4944@emacsbugs.donarmstrong.com To: Kenny Stuart Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 19 18:07:22 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NBATa-0002qD-8P for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Nov 2009 18:07:22 +0100 Original-Received: from localhost ([127.0.0.1]:35133 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBATX-0005V2-Dw for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Nov 2009 12:07:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NBAAN-0004xq-Kt for bug-gnu-emacs@gnu.org; Thu, 19 Nov 2009 11:47:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NBAAH-0004nJ-Ei for bug-gnu-emacs@gnu.org; Thu, 19 Nov 2009 11:47:30 -0500 Original-Received: from [199.232.76.173] (port=52165 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBAAH-0004mg-7m for bug-gnu-emacs@gnu.org; Thu, 19 Nov 2009 11:47:25 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:36164) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NBAAF-0002lZ-UW for bug-gnu-emacs@gnu.org; Thu, 19 Nov 2009 11:47:24 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAJGlKBG018128; Thu, 19 Nov 2009 08:47:21 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nAJGU638016677; Thu, 19 Nov 2009 08:30:07 -0800 Resent-Date: Thu, 19 Nov 2009 08:30:07 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Dan Nicolaescu Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 19 Nov 2009 16:30:06 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4944 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: moreinfo Original-Received: via spool by 4944-submit@emacsbugs.donarmstrong.com id=B4944.125864778116115 (code B ref 4944); Thu, 19 Nov 2009 16:30:06 +0000 Original-Received: (at 4944) by emacsbugs.donarmstrong.com; 19 Nov 2009 16:23:01 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from colin-baker-v0.ics.uci.edu (colin-baker-v0.ics.uci.edu [128.195.1.153]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAJGN0ka016112 for <4944@emacsbugs.donarmstrong.com>; Thu, 19 Nov 2009 08:23:01 -0800 Original-Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by colin-baker-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id nAJGMkvu016169 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 19 Nov 2009 08:22:47 -0800 Original-Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id nAJGMkkI021001; Thu, 19 Nov 2009 08:22:46 -0800 (PST) In-Reply-To: (Kenny Stuart's message of "Thu, 19 Nov 2009 09:25:37 +0000") Original-Lines: 112 X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: nAJGMkvu016169 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.363, required 5, autolearn=disabled, ALL_TRUSTED -1.44, TW_SM 0.08) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Thu, 19 Nov 2009 11:47:30 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:32715 Archived-At: Kenny Stuart writes: > On 18 Nov 2009, at 18:25, Dan Nicolaescu wrote: > > > Kenny Stuart writes: > > > Please write in English if possible, because the Emacs maintainers > > usually do not have translators to read other languages for them. > > > > Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing > list. > > > > Please describe exactly what actions triggered the bug > > and the precise symptoms of the bug. If you can, give > > a recipe starting from `emacs -Q': > > > > This is a feature request to add the facility to start an emacs server > > using a command-line option that runs as a foreground process instead > > of forking a daemon and exiting. > > > > Motivation: > > > > Forking a daemon then exiting the main process is incompatible with > > systems that manage processes as services, such as launchd on OS X, > > therefore it is not possible to create an effective launchd service > > using emacs in daemon mode. > > > > Possible Solution: > > > > For review I have included a patch that adds a --server command line > > option that does what the --daemon option does, except it runs the > > server in the foreground process rather than forking a daemon and > > exiting. > > > How is this different from: > > emacs -f server-start > > ? > > Also note that you do not have to start the daemon explicitly, if you use > > emacsclient -a "" > > it will start an emacs daemon if one is not already running. > > Please keep 4944@emacsbugs.donarmstrong.com in Cc: so that these messages can be archived and seen by more people. > Neither of these appear compatible with launchd (and probably smf under > Solaris). Can you please explain what do you mean by that? It would also help if you would explain what are you trying to do, how are you trying to do it, and what exactly are the problems that you faced when trying to do that. > emacs -f server-start will initialize the display system, which is undesirable > when > starting emacs as a service, equally closing the last emacs window will > terminate the > server. > > emacsclient -ca "" produces the following output on my mac running OS X 10.6.2 > > emacsclient: can't find socket; have you started the server? > To start the server in Emacs, type "M-x server-start". > emacsclient: connect: Connection refused > emacs daemon: exec failed: 2 > Error: server did not start correctly > Error: Could not start the Emacs daemon > > So there may be an issue with the trunk builds in this regard, however even if > it did > work surely it is simply starting an instance of emacs in daemon mode, which > will > fork and exit and so would be no different than having manually started the > daemon > beforehand.