unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Madhu <enometh@meer.net>
To: help-gnu-emacs@gnu.org
Subject: connecting to a lost server process
Date: 12 Jul 2019 06:20:57 -0000	[thread overview]
Message-ID: <20190712062057.15599.qmail@localhost.localdomain> (raw)

I'm having problems with the behaviour of emacs --daemon.  Under some
circumstances when the emacsclient -t dies (say when the GNU screen
dungeon collapses), The server file and server directory gets
unexpectedly deleted.  In this case the server is left running but one
cannot connect to it.

The socket is still open as can be seen in /proc/<emacspid>/fd/ - is
there some linux arcana that can be exploited to connect to it?

Earlier it used to be possible to gdb attach to the emacs process and
to restart the server. Something like
Feval(Fcar(Fread_from_string(build_string("(server-start)"),Qnil,Qnil)),Qnil)
But for some time now that route hits a
terminate_due_to_signal. (Apparently make-network-process tries to
signal an error which calls emacs_abort which ends the show)

[Unfortunately recently the robustness of the server mechanism has gone
down - (especially since elogind).  Typically I set
XDG_RUNTIME_DIR=/dev/shm/<username> in my environment and start a
server which i expect to survive restarts in dbus, elogind etc.  That
seems no longer possible even when using a --without-x emacs.]






             reply	other threads:[~2019-07-12  6:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-12  6:20 Madhu [this message]
2019-07-12  7:54 ` connecting to a lost server process Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190712062057.15599.qmail@localhost.localdomain \
    --to=enometh@meer.net \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).