[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#68799: 30.0.50; emacs --fg-daemon fails silently if server-start fai
From: |
Spencer Baugh |
Subject: |
bug#68799: 30.0.50; emacs --fg-daemon fails silently if server-start fails |
Date: |
Mon, 29 Jan 2024 15:28:47 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Spencer Baugh <sbaugh@janestreet.com>
>> Cc: 68799@debbugs.gnu.org
>> Date: Mon, 29 Jan 2024 13:13:42 -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?
For example, this will also fail to start the server and hang with no
error message:
emacs --eval '(error)' --daemon
Likewise any errors raised in init.el will also just hang without
starting the server, although that at least causes some logs to be
printed.
Maybe we should handle this in the C top_level_1, conditional on
IS_DAEMON?
- bug#68799: 30.0.50; emacs --fg-daemon fails silently if server-start fails, Spencer Baugh, 2024/01/29
- bug#68799: 30.0.50; emacs --fg-daemon fails silently if server-start fails, Eli Zaretskii, 2024/01/29
- bug#68799: 30.0.50; emacs --fg-daemon fails silently if server-start fails, Eli Zaretskii, 2024/01/29
- bug#68799: 30.0.50; emacs --fg-daemon fails silently if server-start fails, Spencer Baugh, 2024/01/29
- bug#68799: 30.0.50; emacs --fg-daemon fails silently if server-start fails, Eli Zaretskii, 2024/01/29
- bug#68799: 30.0.50; emacs --fg-daemon fails silently if server-start fails, Spencer Baugh, 2024/01/29
- bug#68799: 30.0.50; emacs --fg-daemon fails silently if server-start fails, Eli Zaretskii, 2024/01/29
- bug#68799: 30.0.50; emacs --fg-daemon fails silently if server-start fails,
Spencer Baugh <=
- bug#68799: 30.0.50; emacs --fg-daemon fails silently if server-start fails, Eli Zaretskii, 2024/01/30