From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 6PkYCvMGcV99WgAA0tVLHw (envelope-from ) for ; Sun, 27 Sep 2020 21:41:07 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id KF7nBfMGcV+kYAAAbx9fmQ (envelope-from ) for ; Sun, 27 Sep 2020 21:41:07 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3C2B09402DA for ; Sun, 27 Sep 2020 21:41:06 +0000 (UTC) Received: from localhost ([::1]:44006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kMePp-00010y-73 for larch@yhetil.org; Sun, 27 Sep 2020 17:41:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51862) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kMb7a-0003kF-Q9 for bug-guix@gnu.org; Sun, 27 Sep 2020 14:10:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38846) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kMb7a-0006i7-G3 for bug-guix@gnu.org; Sun, 27 Sep 2020 14:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kMb7a-0000Eb-Ac for bug-guix@gnu.org; Sun, 27 Sep 2020 14:10:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#43643: start shepherd when a previous instance was killed by kill -9 Resent-From: gfleury@disroot.org Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 27 Sep 2020 18:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43643 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: "Danny Milosavljevic" Received: via spool by 43643-submit@debbugs.gnu.org id=B43643.1601230166853 (code B ref 43643); Sun, 27 Sep 2020 18:10:02 +0000 Received: (at 43643) by debbugs.gnu.org; 27 Sep 2020 18:09:26 +0000 Received: from localhost ([127.0.0.1]:50392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMb70-0000Dh-JQ for submit@debbugs.gnu.org; Sun, 27 Sep 2020 14:09:26 -0400 Received: from knopi.disroot.org ([178.21.23.139]:52100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMb6y-0000DY-2x for 43643@debbugs.gnu.org; Sun, 27 Sep 2020 14:09:25 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id A0A2D529AB; Sun, 27 Sep 2020 20:09:22 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YZrsqQhCLFvh; Sun, 27 Sep 2020 20:09:21 +0200 (CEST) Mime-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1601230161; bh=z2/voU6HtbHfCIOUQAU6P+ihJsofxLCQsfe+Nri0SgY=; h=Date:From:Subject:To:Cc:In-Reply-To:References; b=ZW2LbvNIXemwOM1+8LAEkK80o8Zcsxjv/ElWcn5gfretrwxTazWdCZE75zuheP7hq iqruqXYvjAKFQvKpLiq1aJq7bZkbseyVh5Mknn72QPeh5g19+EPuIraahBVzTw9SRv z8jXLkaSzH85k+eS9PLH7Ufl9nzTth3NRtmv0u2nPy3lYb4VXD3k9lFIlw+Ng5CxKO o2/D4eVLy+onKfafXQPQWXd55hKZEux01NEV9Bfv40ebueHI3sHXWSMYhSgCLOVett Qfl2KODP1dSbelFTnwAWE5B29wZlmVigdWtQnwbDJeki/1gd9xyucAw0CZVicneXUC BDxlHm509m8EQ== Date: Sun, 27 Sep 2020 18:09:21 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: gfleury@disroot.org Message-ID: In-Reply-To: <20200927161906.399fe259@scratchpost.org> References: <20200927161906.399fe259@scratchpost.org> <87k0wfejjw.fsf@disroot.org> X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-Mailman-Approved-At: Sun, 27 Sep 2020 17:40:32 -0400 X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 43643@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=disroot.org header.s=mail header.b=ZW2LbvNI; dmarc=fail reason="SPF not aligned (relaxed)" header.from=disroot.org (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: 0.59 X-TUID: bj8KJRcglret hello,=0A=0A27 septembre 2020 16:29 "Danny Milosavljevic" a =C3=A9crit:=0A=0A> Hello,=0A> =0A> On Sun, 27 Sep 2020 10:00:= 03 +0200=0A> gfleury wrote:=0A> =0A>> it throws a e= rror:=0A>> ---------------------------------------------------------=0A>>= 3 (primitive-load "/home/gfleury/prod/shepherd/./shepherd")=0A>> In shep= herd.scm:=0A>> 56:14 2 (main . _)=0A>> 49:6 1 (open-server-socket _)=0A>>= In unknown file:=0A>> 0 (bind # #(1 "/run/user/= 1000?") #)=0A>> =0A>> ERROR: In procedure bind:=0A>> In procedure bind: A= ddress already in use=0A>> ----------------------------------------------= -----------=0A>> =0A>> something like this patch can fix it.=0A> =0A> Ple= ase don't do it that way.=0A> =0A> Shepherd has to be able to ascertain t= hat it is not running yet before=0A> starting yet another instance in par= allel.=0A> =0Ai missed that part.=0A=0A> I don't like PID and socket file= s either--but it's just what we have=0A> available.=0A> =0A> Maybe find o= ut who is at the other side of the socket=0A> (connect and then use getpe= ername on the socket or something ?=0A> maybe even just trying to connect= fails, which would be good for this).=0A> =0A> I think UNIX domain socke= ts are made in a way that it doesn't matter=0A> whether the server or the= client connects first, so even that would=0A> probably not be reliable.= =0A> =0A> So maybe just live with having to remove the socket file yourse= lf.=0A> =0A> I'm open to other suggestions that are safe that accomplish = the same goal.=0A=0Ayes a better solution is needed.