GNU bug report logs -
#68799
30.0.50; emacs --fg-daemon fails silently if server-start fails
Previous Next
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 #29 received at 68799 <at> debbugs.gnu.org (full text, mbox):
> From: Spencer Baugh <sbaugh <at> janestreet.com>
> Cc: 68799 <at> debbugs.gnu.org
> Date: Mon, 29 Jan 2024 15:28:47 -0500
>
> >> --- a/lisp/startup.el
> >> +++ b/lisp/startup.el
> >> @@ -1627,7 +1627,11 @@ command-line
> >> (let ((dn (daemonp)))
> >> (when dn
> >> (when (stringp dn) (setq server-name dn))
> >> - (server-start)
> >> + (condition-case err
> >> + (server-start)
> >> + (error
> >> + (message "%s" (error-message-string err))
> >> + (kill-emacs 1)))
> >
> > Thanks, this needs a comment explaining why we need condition-case and
> > where does error-message-string come from.
>
> Actually, on second thought, we could fail anywhere in startup.el, not
> just in server-start. So should we actually have a wrapper around all
> of normal-top-level which detects an error at startup in a daemon?
I'd prefer to handle each specific problem specially, to make sure the
error message is self-explanatory. Also, if the error happens after
the server has been started, there's no reason to forcibly exit.
So I think we should for now solve this particular issue, and not try
generalizing too much.
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.