From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Roshan Shariff Newsgroups: gmane.emacs.bugs Subject: bug#47511: 27.1; emacs --daemon should not delete systemd socket on exit Date: Tue, 30 Mar 2021 19:28:28 -0600 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25439"; mail-complaints-to="usenet@ciao.gmane.io" To: 47511@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 31 04:47:16 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lRQt1-0006Tl-U9 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 31 Mar 2021 04:47:16 +0200 Original-Received: from localhost ([::1]:50758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRQt0-0003UG-GH for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 30 Mar 2021 22:47:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRQst-0003U8-IZ for bug-gnu-emacs@gnu.org; Tue, 30 Mar 2021 22:47:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41615) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lRQso-0001u5-FJ for bug-gnu-emacs@gnu.org; Tue, 30 Mar 2021 22:47:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lRQso-0007WU-DN for bug-gnu-emacs@gnu.org; Tue, 30 Mar 2021 22:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Roshan Shariff Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 31 Mar 2021 02:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47511 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.161715881828904 (code B ref -1); Wed, 31 Mar 2021 02:47:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 31 Mar 2021 02:46:58 +0000 Original-Received: from localhost ([127.0.0.1]:53161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRQsi-0007W5-7Y for submit@debbugs.gnu.org; Tue, 30 Mar 2021 22:46:57 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:40324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRPf3-0003R3-7I for submit@debbugs.gnu.org; Tue, 30 Mar 2021 21:28:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRPf2-0001xe-VR for bug-gnu-emacs@gnu.org; Tue, 30 Mar 2021 21:28:45 -0400 Original-Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]:34519) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lRPf0-00074B-Nk for bug-gnu-emacs@gnu.org; Tue, 30 Mar 2021 21:28:44 -0400 Original-Received: by mail-lj1-x22e.google.com with SMTP id f16so21969153ljm.1 for ; Tue, 30 Mar 2021 18:28:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=/t/FIX7iPhxOcEaxyTvD9rViipHo4/Z5Hi9mODutnc0=; b=jKeHQQpPMH+TDOpmcxbAPHItYMS0sOT7ryvD4d68g73G+okhFVR6S2ayBAq5Xsu3Ru Ra9PbOiqqbbnd6ooDPrANryx3+1I9wjIRpPQc9BfcSdJadNycVoVHByVICkfg6ikIUDa 25TOgOJ5BbhCPobQUm2TH1sS5UygWn5QBHus5Lz5ldDjszCpAKeMhop/dcOkF1JVKUwV LpSk3BlFJBATlyBbzvJYb4TA9fVk/U64pIXytqFCr36Bn+G2wl8aciE0Khc6Bdm/Gz8r VqNiUgvgjsMlt9sckyMcCKMNVwCcsI4FJQd/UcA9yarveQfntRWnkdsbEKUsJWaurwoB iUQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=/t/FIX7iPhxOcEaxyTvD9rViipHo4/Z5Hi9mODutnc0=; b=GZfOaQqCwao/0fdTho9FaPdwEGX5L5VPRlvN5j4mDqwKMTo4SyZn/TASYfdSurMTvL r/qpsBZy1q1cz0wnuKR8dB3SS2XLVXG6KBVu8/J41/uEyROPfVd3gR5BEcuo5t0nnfBA U9rlftozsRGGipiaQH3I8SSRcd8VMsl+7FRy8ZEyrLEr47A9aZBAmbrMKvU3FDb7Sa2j 2NOzeyulSArl81J59fIoC3ixm18gblo9NrK2ArCg8FVeynYIac3P7IGABCKM3BLbsYgc rR1iyT8e12R/wIwEQXjyAIkc0hTtD7q3e9tGOzaPN6CFenQcqsZMd1cdiZ1HIhJR6Lfu /8rQ== X-Gm-Message-State: AOAM5318GgNTpArnRFDuLV0CHXoUVlfE2z3rGjGj6uvm+Ci9v2zDJIoc 2omfTQ+JPZV21BeBfooKu8BpbQKqSl5xIfQQYNM0J2t+YmhKpQ== X-Google-Smtp-Source: ABdhPJxgHCicWGCUstoehPl7azhlesnW3y3eBHEs7/HbMVogshZ638e3qjhi59nWTjFepuSCVaiz76M0dhItQKCU1xo= X-Received: by 2002:a2e:5347:: with SMTP id t7mr452276ljd.263.1617154119876; Tue, 30 Mar 2021 18:28:39 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::22e; envelope-from=roshan.shariff@gmail.com; helo=mail-lj1-x22e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 30 Mar 2021 22:46:55 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:203329 Archived-At: I'm using systemd socket activation to start the Emacs daemon, as documented in the manual section "Emacs Server". When I run emacsclient -e '(kill-emacs)' to stop the daemon, the socket file gets deleted even though it was not created by the daemon. Since systemd is not aware of this, it does not recreate the socket until I run systemctl --user restart emacs.socket. Until then, it is impossible to restart the daemon via socket activation. Indeed, the systemd.socket(5) man page says "A daemon listening on an AF_UNIX socket [...] must not unlink the socket from a file system." In my uninformed opinion, the server-sentinel function in server.el (and possibly other functions) should be patched to avoid deleting the socket if it was externally created, i.e. when internal--daemon-sockname is non-nil. As a temporary work-around, I advised delete-file to ignore the file named by internal--daemon-sockname. Thanks! In GNU Emacs 27.1 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.22, cairo version 1.16.0) of 2020-08-20 built on buildhw-x86-03.iad2.fedoraproject.org Windowing system distributor 'Fedora Project', version 11.0.12010000 System Description: Fedora 33 (Workstation Edition) Configured using: 'configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3 --with-gpm=no --with-xwidgets --with-modules --with-harfbuzz --with-cairo --with-json build_alias=x86_64-redhat-linux-gnu host_alias=x86_64-redhat-linux-gnu CC=gcc 'CFLAGS=-DMAIL_USE_LOCKF -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' LDFLAGS=-Wl,-z,relro PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig' Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS LIBSYSTEMD JSON PDUMPER GMP Important settings: value of $LANG: en_CA.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-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 auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv 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 tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic 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 charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting xwidget-internal cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 45201 8720) (symbols 48 6010 1) (strings 32 15472 2136) (string-bytes 1 504974) (vectors 16 10110) (vector-slots 8 130409 10426) (floats 8 19 39) (intervals 56 260 0) (buffers 1000 11))