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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#68799: closed (30.0.50; emacs --fg-daemon fails silently if server-s


From: GNU bug Tracking System
Subject: bug#68799: closed (30.0.50; emacs --fg-daemon fails silently if server-start fails)
Date: Sat, 24 Feb 2024 09:22:01 +0000

Your message dated Sat, 24 Feb 2024 11:20:46 +0200
with message-id <86msrqz09d.fsf@gnu.org>
and subject line Re: bug#68799: 30.0.50; emacs --fg-daemon fails silently if 
server-start fails
has caused the debbugs.gnu.org bug report #68799,
regarding 30.0.50; emacs --fg-daemon fails silently if server-start fails
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
68799: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68799
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 30.0.50; emacs --fg-daemon fails silently if server-start fails Date: Mon, 29 Jan 2024 11:54:21 -0500
1. emacs -Q --fg-daemon=/nonexistent/dir/sock
2. Emacs prints "Starting Emacs daemon." and sits in foreground.
3. emacsclient -c -s /nonexistent/dir/sock
4. emacsclient prints and exits:
emacsclient: can't find socket; have you started the server?
emacsclient: To start the server in Emacs, type "M-x server-start".
emacsclient: error accessing socket "/nonexistent/dir/sock"

This is because in step 1, the server actually failed to start, but
Emacs did not log that at all.  In fact, it's impossible to access the
Emacs started in 1 now, since it's not actually running a server and it
has no frames.

The same thing happens with --bg-daemon, although it's slightly more
obvious that something is wrong in that case, because --bg-daemon is not
supposed to sit in foreground.

Emacs with --fg-daemon should instead print an error and exit if it
fails to start the server.


In GNU Emacs 30.0.50 (build 22, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.15.12, Xaw scroll bars) of 2024-01-29 built on
 igm-qws-u22796a
Repository revision: cbc8bdc1386a4bc9c420d8ab06b844c6f6928c35
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Rocky Linux 8.9 (Green Obsidian)

Configured using:
 'configure -C 'CFLAGS=-O0 -g3' --with-gif=ifavailable
 --with-x-toolkit=lucid'

Configured features:
CAIRO DBUS FREETYPE GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG
SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM
XINPUT2 XPM LUCID ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date subr-x mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset
image regexp-opt fringe tabulated-list replace newcomment text-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo x-toolkit
xinput2 x multi-tty move-toolbar make-network-process emacs)

Memory information:
((conses 16 64886 10659) (symbols 48 9545 0) (strings 32 22761 1636)
 (string-bytes 1 676280) (vectors 16 9262)
 (vector-slots 8 111310 9095) (floats 8 40 17) (intervals 56 262 0)
 (buffers 976 10))



--- End Message ---
--- Begin Message --- Subject: Re: bug#68799: 30.0.50; emacs --fg-daemon fails silently if server-start fails Date: Sat, 24 Feb 2024 11:20:46 +0200
> From: Spencer Baugh <sbaugh@janestreet.com>
> Cc: 68799@debbugs.gnu.org,  monnier@iro.umontreal.ca,  jasonr@gnu.org
> Date: Wed, 14 Feb 2024 11:11:10 -0500
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: Spencer Baugh <sbaugh@janestreet.com>
> >> Cc: 68799@debbugs.gnu.org,  monnier@iro.umontreal.ca,  jasonr@gnu.org
> >> Date: Tue, 13 Feb 2024 15:20:21 -0500
> >> 
> >> To be clear, the patch I posted which checks DAEMON_RUNNING *does* solve
> >> that.
> >> 
> >> $ ./src/emacs -Q --fg-daemon=/tmp/foo
> >> Starting Emacs daemon.
> >> ‘/tmp’ is not a safe directory because it is not owned by you (owner = 
> >> root (0))
> >> $ 
> >> 
> >> (which previously would have hung)
> >> 
> >> The issue now is solely that the printed error message is maybe not
> >> informative enough.
> >> 
> >> So how about the following diff, which changes the output to:
> >> 
> >> $ ./src/emacs -Q --fg-daemon=/tmp/foo
> >> Starting Emacs daemon.
> >> Unable to start daemon: ‘/tmp’ is not a safe directory because it is not 
> >> owned by you (owner = root (0))
> >
> > That's an improvement, but maybe it will be even better if you append
> > "; exiting" at the end of the message?
> 
> Can do.  Here's the patch, which should be applied in addition to the
> DAEMON_RUNNING patch I posted earlier.

Thanks, installed.


--- End Message ---

reply via email to

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