Subject: Re: bug#68799: 30.0.50; emacs --fg-daemon fails silently if server-start fails

From: Björn Bidar <[email-masked]>
Date: Wed, 14 Feb 2024 19:40:30 +0200

Eli Zaretskii <[email-masked]> writes:

>> From: Björn Bidar <[email-masked]>
>> Cc: [email-masked],  [email-masked]
>> Date: Wed, 14 Feb 2024 17:10:39 +0200
>> 
>> 0. User logs in
>> 1. The session reaches graphical-session.target
>> 2. Emacs executed in emacs.service 
>> 3. Emacs launches with all it's modes loaded, desktop-mode session
>> restored etc.
>> 4. Emacs is ready to receive commands
>> 
>> When the user starts emacsclient before step 4 is reached then it can
>> timeout because it can take some time till Emacs is ready.
>
> Wouldn't this be a cockpit mistake?  The user presumably knows that
> loading desktop takes some time, and should give Emacs that time
> before invoking emacsclient.  No?

Of course but it the user doesn't know how exactly Emacs takes to start
and to avoid race conditions it would make sense to wait.