GNU bug report logs - #68799
30.0.50; emacs --fg-daemon fails silently if server-start fails

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Mon, 29 Jan 2024 16:55:02 UTC

Severity: normal

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 68799 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: sbaugh <at> janestreet.com
Cc: 68799 <at> debbugs.gnu.org
Subject: Re: bug#68799: 30.0.50;
 emacs --fg-daemon fails silently if server-start fails
Date: Mon, 29 Jan 2024 19:18:22 +0200
> Cc: 68799 <at> debbugs.gnu.org
> Date: Mon, 29 Jan 2024 19:11:36 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> Have some faith in Emacs: we already do that.  From startup.el:
> 
>   (let ((dn (daemonp)))
>     (when dn
>       (when (stringp dn) (setq server-name dn))
>       (server-start)
>       (if server-process
> 	  (daemon-initialized)
> 	(if (stringp dn)
> 	    (message
> 	     "Unable to start daemon: Emacs server named %S already running"
> 	     server-name)
> 	  (message "Unable to start the daemon.\nAnother instance of Emacs is running the server, either as daemon or interactively.\nYou can use emacsclient to connect to that Emacs process."))
> 	(kill-emacs 1))))
> 
> So the problem seems to be that somehow server-start succeeds to leave
> a non-nil server-process variable behind, although testing that is the
> documented way of telling whether server is running.

Or maybe server-start signals an error, and then the code which shows
an error message and shuts down Emacs doesn't get run?




This bug report was last modified 1 year and 87 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.