[Top][All Lists]

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

Re: bug in server-start

From: Ulrich Mueller
Subject: Re: bug in server-start
Date: Tue, 16 Dec 2008 08:03:54 +0100

>>>>> On Mon, 15 Dec 2008, Juanma Barranquero wrote:

> On Mon, Dec 15, 2008 at 18:24, Dan Nicolaescu <address@hidden> wrote:
>> We could install something by default to restart the server when
>> receiving an USR1 or USR2 signal.

> That was discussed a while ago, IIRC. Why wasn't it installed?

As far as I've understood, Stefan didn't find it very useful. So I've
added the following to Gentoo site initialisation, if Emacs is running
as a daemon: (define-key special-event-map [sigusr1] 'server-start)

>> Also currently the daemon is broken:
>> emacs -Q -f server-start&
>> emacs --daemon
>> Server "server" is already running
>> and the daemon is not started...

> Do you mean, I suppose, that Emacs starts but it is not responsive
> because it is running no server?

> How do you propose to fix it? We can make --daemon to do the
> equivalent of "(progn (server-force-delete) (server-start))",

Hm, this doesn't look very consistent to me, because the behaviour is
different from starting a second server.

> or exit with an error if there's a name-matching server. Other
> ideas?

Exit with an error, please. And if possible, the parent process should
return a nonzero exit status. (AFAICS, not calling daemon-initialized
should be sufficient for this, but I haven't tested it.)

If users want a daemon to take precedence over a "normal" server (i.e.
your first suggestion), they can still put a (server-force-delete)
into their .emacs or site-start.el.


reply via email to

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