unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ulrich Mueller <ulm@gentoo.org>
To: bwoster <bwooster47@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: emacs --daemon should provide a way to get its process id
Date: Sat, 1 Nov 2008 18:33:30 +0100	[thread overview]
Message-ID: <18700.37610.141752.354482@a1ihome1.kph.uni-mainz.de> (raw)
In-Reply-To: <20280352.post@talk.nabble.com>

>>>>> On Sat, 1 Nov 2008, bwoster wrote:

>> Any opinions about attached patch which adds a "--pidfile" option?

> 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?

The second one will win and overwrite the file. That's why you
normally start daemons with a tool like "start-stop-daemon" which
takes care of locking.

Ulrich




  reply	other threads:[~2008-11-01 17:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-31 19:19 emacs --daemon should provide a way to get its process id Ulrich Mueller
2008-11-01 14:05 ` bwoster
2008-11-01 17:33   ` Ulrich Mueller [this message]
2008-11-02  1:55 ` Stefan Monnier
2008-11-02  2:18   ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18700.37610.141752.354482@a1ihome1.kph.uni-mainz.de \
    --to=ulm@gentoo.org \
    --cc=bwooster47@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).