emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs --daemon should provide a way to get its process id


From: Ulrich Mueller
Subject: Re: emacs --daemon should provide a way to get its process id
Date: Sat, 1 Nov 2008 18:33:30 +0100

>>>>> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]