From mboxrd@z Thu Jan 1 00:00:00 1970 From: iyzsong@member.fsf.org (=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?=) Subject: bug#34407: [PATCH] shepherd: Delete the socket file upon exit. Date: Sat, 23 Feb 2019 16:53:00 +0800 Message-ID: <87bm32998z.fsf__21363.404979796$1550912056$gmane$org@member.fsf.org> References: <87ef87w0d3.fsf@member.fsf.org> <20190219200900.12407d94@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:50055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gxT4N-0007JX-Ee for bug-guix@gnu.org; Sat, 23 Feb 2019 03:54:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gxT4M-0000Zo-BY for bug-guix@gnu.org; Sat, 23 Feb 2019 03:54:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35297) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gxT4L-0000ZC-Qr for bug-guix@gnu.org; Sat, 23 Feb 2019 03:54:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gxT4L-0004qc-P5 for bug-guix@gnu.org; Sat, 23 Feb 2019 03:54:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20190219200900.12407d94@scratchpost.org> (Danny Milosavljevic's message of "Tue, 19 Feb 2019 20:08:59 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Danny Milosavljevic Cc: guix-devel@gnu.org, 34407@debbugs.gnu.org Danny Milosavljevic writes: > On Sun, 17 Feb 2019 11:38:16 +0800 > iyzsong@member.fsf.org (=E5=AE=8B=E6=96=87=E6=AD=A6) wrote: > >> Yes, I have the 'rm /run/user/1000/shepherd/socket' workaround in my ses= sion >> script too... >>=20 >> According to 'man 2 bind', the socket pathname should be deleted when no >> longer required, so a patch to fix this bug: > > Hmm, I guess you can do that. > > But /run is supposed to be a tmpfs and elogind is supposed to rm -rf /run= /user/1000 > after all sessions of that user terminated in any case, so how is it left= over > in the first place? > Well, maybe the elogind version I used didn't have this feature, or I had another user session running... > If the deletion in the case above doesn't work, please report a bug. Thanks, good to know, and it indeed works. > > If that patch is only in order to enable users to restart user's shepherd > without exiting all their sessions, then I guess that's ok--although unus= ual. > > Does your patch do the right thing if the user's shepherd is already > running? (i.e. keep the socket file) Yes, it deletes the socket file at exit (not at startup).