From mboxrd@z Thu Jan 1 00:00:00 1970 From: iyzsong@member.fsf.org (=?utf-8?B?5a6L5paH5q2m?=) Subject: Re: [PATCH] shepherd: Delete the socket file upon exit. Date: Sat, 23 Feb 2019 16:53:00 +0800 Message-ID: <87bm32998z.fsf@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]:49930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gxT3z-0007Bh-QQ for guix-devel@gnu.org; Sat, 23 Feb 2019 03:53:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gxT3x-0000O7-M8 for guix-devel@gnu.org; Sat, 23 Feb 2019 03:53:39 -0500 Received: from rezeros.cc ([45.76.207.221]:49656) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gxT3u-0000Gb-2i for guix-devel@gnu.org; Sat, 23 Feb 2019 03:53:35 -0500 In-Reply-To: <20190219200900.12407d94@scratchpost.org> (Danny Milosavljevic's message of "Tue, 19 Feb 2019 20:08:59 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" 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).