From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bwoster Newsgroups: gmane.emacs.devel Subject: Re: emacs --daemon should provide a way to get its process id Date: Sat, 1 Nov 2008 07:05:29 -0700 (PDT) Message-ID: <20280352.post@talk.nabble.com> References: <18699.23113.985700.25955@a1ihome1.kph.uni-mainz.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1225548398 785 80.91.229.12 (1 Nov 2008 14:06:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Nov 2008 14:06:38 +0000 (UTC) To: Emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 01 15:07:40 2008 connect(): Connection refused 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 1KwH8c-0004Zw-Mn for ged-emacs-devel@m.gmane.org; Sat, 01 Nov 2008 15:07:39 +0100 Original-Received: from localhost ([127.0.0.1]:56597 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KwH7W-0001dz-1Q for ged-emacs-devel@m.gmane.org; Sat, 01 Nov 2008 10:06:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KwH6f-0001IA-AF for emacs-devel@gnu.org; Sat, 01 Nov 2008 10:05:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KwH6d-0001HI-FA for Emacs-devel@gnu.org; Sat, 01 Nov 2008 10:05:36 -0400 Original-Received: from [199.232.76.173] (port=33296 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KwH6d-0001H8-BZ for Emacs-devel@gnu.org; Sat, 01 Nov 2008 10:05:35 -0400 Original-Received: from kuber.nabble.com ([216.139.236.158]:59675) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KwH6c-0000jq-3Z for Emacs-devel@gnu.org; Sat, 01 Nov 2008 10:05:34 -0400 Original-Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1KwH6X-0008Tr-Nv for Emacs-devel@gnu.org; Sat, 01 Nov 2008 07:05:29 -0700 In-Reply-To: <18699.23113.985700.25955@a1ihome1.kph.uni-mainz.de> X-Nabble-From: bwooster47@gmail.com X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:105237 Archived-At: Ulrich Mueller-2 wrote: > > by OpenRC's "start-stop-daemon"). What seems to be missing is an easy > way to get the process id of the daemon. > Most other programs running as a daemon save their process id in a > file, typically located under /var/run. > ... > Any opinions about attached patch which adds a "--pidfile" option? > ... > Ulrich > I'm all for it! I've just spent an hour trying to test out an init.d script, but it is not very robust without a pidfile, so your patch would make things so much easier... Emacs does have the (emacs-pid) lisp function, but that too is not easy to try, and there may be race conditions when two --daemons are started. Actually... with your patch, if two emacs --daemon --pidfile=same_file are started, what will happen? -- View this message in context: http://www.nabble.com/emacs---daemon-should-provide-a-way-to-get-its-process-id-tp20272581p20280352.html Sent from the Emacs - Dev mailing list archive at Nabble.com.