bug-gnu-emacs
[Top][All Lists]
Advanced

[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 12:32:00 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:
>> Cc: 68799@debbugs.gnu.org
>> Date: Mon, 29 Jan 2024 19:11:36 +0200
>> From: Eli Zaretskii <eliz@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?

Yes, that's exactly what happens.

So should we wrap a condition-case around server-start, I suppose?





reply via email to

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