From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Madhu Newsgroups: gmane.emacs.help Subject: connecting to a lost server process Date: 12 Jul 2019 06:20:57 -0000 Message-ID: <20190712062057.15599.qmail@localhost.localdomain> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="114459"; mail-complaints-to="usenet@blaine.gmane.org" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 12 09:10:45 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hlpha-000nZv-4h for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Jul 2019 09:10:42 +0200 Original-Received: from localhost ([::1]:47098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlphZ-0002Tc-60 for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Jul 2019 03:10:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60765) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlphW-0002SI-6T for help-gnu-emacs@gnu.org; Fri, 12 Jul 2019 03:10:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hlphV-0005w0-Br for help-gnu-emacs@gnu.org; Fri, 12 Jul 2019 03:10:38 -0400 Original-Received: from [117.193.18.69] (port=48874 helo=localhost.localdomain) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hlphU-0005r9-N9 for help-gnu-emacs@gnu.org; Fri, 12 Jul 2019 03:10:37 -0400 Original-Received: (qmail 15600 invoked by uid 500); 12 Jul 2019 06:20:57 -0000 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 117.193.18.69 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:122041 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//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/ 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.]